Send SMS with GET

Legacy APIs - SMS
Starting a new integration? This is a legacy API. It stays available for existing integrations, but new integrations should use the SMS V3 APIs.

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.

GEThttps://telcomw.com/api-v2/text

Send the parameters in the URL (query parameters).

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.

Example request

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())

Response

The response is JSON.

{
  "type": "success",
  "msg": "send",
  "code": "200",
  "feedback": [
    {
      "status": 2,
      "cost": 18,
      "msdn": "265884113450",
      "chars": 12,
      "code": 200,
      "id": "ke4wz6fydbtj"
    }
  ]
}

Fields explained

FieldDescription
typeThe type of response.
msgA message with more information about the request.
codeA code for the status of the request.
feedback[].statusThe status of the message.
feedback[].costThe cost of sending the message.
feedback[].msdnThe phone number of the message.
feedback[].charsThe number of characters in the message.
feedback[].codeA code for the result of sending the message.
feedback[].idA unique identifier of the message.

Good to know

  • Keep the api_key and password secure and do not expose them publicly.
  • The response varies with the success or failure of sending. Check the status field in feedback.