Send an OTP to a phone number on the channels you choose.
https://otp_api.telcomw.com/requestSend the parameters in the URL (query parameters).
| Parameter | Required | Description |
id |
YES | Your id for the request. Use the same id when you verify the OTP. |
client |
YES | The phone number that receives the OTP, for example 265992026866. |
channels |
YES | The channels to deliver the OTP on, as a list: wa.audio, wa.text, phone.call, phone.text. |
curl --location --request GET 'https://otp_api.telcomw.com/request?id=123456&client=265992026866&channels=[wa.audio,wa.text,phone.call,phone.text]'
curl --location --request GET "https://otp_api.telcomw.com/request?id=123456&client=265992026866&channels=[wa.audio,wa.text,phone.call,phone.text]"
<?php
$ch = curl_init('https://otp_api.telcomw.com/request?id=123456&client=265992026866&channels=[wa.audio,wa.text,phone.call,phone.text]');
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://otp_api.telcomw.com/request',
params: {
'id': '123456',
'client': '265992026866',
'channels': '[wa.audio,wa.text,phone.call,phone.text]'
}
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
params = {
'id': '123456',
'client': '265992026866',
'channels': '[wa.audio,wa.text,phone.call,phone.text]'
}
response = requests.request('GET', 'https://otp_api.telcomw.com/request', params=params)
print(response.json())
The response is JSON.
{
"status": "success",
"message": "The OTP has been sent successfully",
"route": "request",
"ref": "99CF5784EFF0A32F508ABDD446723C46",
"cost": 50,
"channelsUsed": {
"wa.audio": "successful",
"wa.text": "successful",
"phone.call": "successful",
"phone.text": "successful"
}
}
| Field | Description |
ref | The reference of the OTP. You need it to verify the OTP. |
cost | What the request cost. |
channelsUsed | The result on each channel. |