Send an SMS to one phone number, or to many numbers separated by a comma.
https://telcomw.com/api-v2/sendSend the parameters as form-data.
| Parameter | Required | Description |
api_key |
YES | Your API key. |
password |
YES | Your account password. |
text |
YES | The message to send. |
numbers |
YES | The phone number to send to. Many numbers can be separated by a comma. |
from |
YES | The sender ID, for example WGIT. |
curl --location --request POST 'https://telcomw.com/api-v2/send' \ --data-urlencode 'api_key=YOUR_API_KEY' \ --data-urlencode 'password=YOUR_PASSWORD' \ --data-urlencode 'text=Text message' \ --data-urlencode 'numbers=0992026866' \ --data-urlencode 'from=WGIT'
curl --location --request POST "https://telcomw.com/api-v2/send" ^ --data-urlencode "api_key=YOUR_API_KEY" ^ --data-urlencode "password=YOUR_PASSWORD" ^ --data-urlencode "text=Text message" ^ --data-urlencode "numbers=0992026866" ^ --data-urlencode "from=WGIT"
<?php
$data = [
'api_key' => 'YOUR_API_KEY',
'password' => 'YOUR_PASSWORD',
'text' => 'Text message',
'numbers' => '0992026866',
'from' => 'WGIT'
];
$ch = curl_init('https://telcomw.com/api-v2/send');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
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: 'post',
url: 'https://telcomw.com/api-v2/send',
data: new URLSearchParams({
'api_key': 'YOUR_API_KEY',
'password': 'YOUR_PASSWORD',
'text': 'Text message',
'numbers': '0992026866',
'from': 'WGIT'
})
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
data = {
'api_key': 'YOUR_API_KEY',
'password': 'YOUR_PASSWORD',
'text': 'Text message',
'numbers': '0992026866',
'from': 'WGIT'
}
response = requests.request('POST', 'https://telcomw.com/api-v2/send', data=data)
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, success when the request worked. |
msg | A message about the request. |
code | A code for the result of the request, 200 is success. |
feedback[].status | The status of the message. 2 means the message was sent. |
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 this message. |
feedback[].id | A unique identifier of the message. Use it to get the delivery report. |