Request OTP

OTP Services

Send an OTP to a phone number on the channels you choose.

GEThttps://otp_api.telcomw.com/request

Send the parameters in the URL (query parameters).

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.

Example request

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

Response

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"
  }
}

Fields explained

FieldDescription
refThe reference of the OTP. You need it to verify the OTP.
costWhat the request cost.
channelsUsedThe result on each channel.

Good to know

  • Channels: wa.audio (WhatsApp voice), wa.text (WhatsApp text), phone.call (voice call), phone.text (SMS).