Send a text message to a phone number with a GET request. It needs your API key and password, and it replies with the status of the message.
https://telcomw.com/api-v2/textSend the parameters in the URL (query parameters).
| Parameter | Required | Description |
message |
YES | The content of the text message to be sent. |
phone |
YES | The recipient's phone number. |
api_key |
YES | Your unique API key for authentication. |
password |
YES | Your account password for authentication. |
from |
YES | The sender's identifier or name. |
curl --location --request GET 'https://telcomw.com/api-v2/text?message=Hello&phone=0992026866&api_key=YOUR_API_KEY&password=YOUR_PASSWORD&from=WGIT'
curl --location --request GET "https://telcomw.com/api-v2/text?message=Hello&phone=0992026866&api_key=YOUR_API_KEY&password=YOUR_PASSWORD&from=WGIT"
<?php
$ch = curl_init('https://telcomw.com/api-v2/text?message=Hello&phone=0992026866&api_key=YOUR_API_KEY&password=YOUR_PASSWORD&from=WGIT');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
const axios = require('axios');
axios.request({
method: 'get',
url: 'https://telcomw.com/api-v2/text',
params: {
'message': 'Hello',
'phone': '0992026866',
'api_key': 'YOUR_API_KEY',
'password': 'YOUR_PASSWORD',
'from': 'WGIT'
}
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
params = {
'message': 'Hello',
'phone': '0992026866',
'api_key': 'YOUR_API_KEY',
'password': 'YOUR_PASSWORD',
'from': 'WGIT'
}
response = requests.request('GET', 'https://telcomw.com/api-v2/text', params=params)
print(response.json())
The response is JSON.
{
"type": "success",
"msg": "send",
"code": "200",
"feedback": [
{
"status": 2,
"cost": 18,
"msdn": "265884113450",
"chars": 12,
"code": 200,
"id": "ke4wz6fydbtj"
}
]
}
| Field | Description |
type | The type of response. |
msg | A message with more information about the request. |
code | A code for the status of the request. |
feedback[].status | The status of the message. |
feedback[].cost | The cost of sending the message. |
feedback[].msdn | The phone number of the message. |
feedback[].chars | The number of characters in the message. |
feedback[].code | A code for the result of sending the message. |
feedback[].id | A unique identifier of the message. |