Get secure form

OTP Services

Get a ready made sign in page where the visitor types a phone number and picks how to receive the OTP.

GEThttps://otp_api.telcomw.com/form

Send the parameters in the URL (query parameters).

Parameters

Parameter Required Description
channels YES The channels the visitor can choose from, as a list: wa.audio, wa.text, phone.call, phone.text.
loginURL YES The address of your page that receives the form when it is submitted.

Example request

curl --location --request GET 'https://otp_api.telcomw.com/form?channels=[wa.audio,wa.text,phone.call,phone.text]&loginURL=https%3A%2F%2Ftelcomw.com%2Flogin2.php'
curl --location --request GET "https://otp_api.telcomw.com/form?channels=[wa.audio,wa.text,phone.call,phone.text]&loginURL=https%3A%2F%2Ftelcomw.com%2Flogin2.php"
<?php

$ch = curl_init('https://otp_api.telcomw.com/form?channels=[wa.audio,wa.text,phone.call,phone.text]&loginURL=https%3A%2F%2Ftelcomw.com%2Flogin2.php');
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/form',
  params: {
    'channels': '[wa.audio,wa.text,phone.call,phone.text]',
    'loginURL': 'https://telcomw.com/login2.php'
  }
}).then((res) => console.log(res.data))
  .catch((err) => console.error(err.response ? err.response.data : err.message));
import requests

params = {
    'channels': '[wa.audio,wa.text,phone.call,phone.text]',
    'loginURL': 'https://telcomw.com/login2.php'
}

response = requests.request('GET', 'https://otp_api.telcomw.com/form', params=params)
print(response.json())

Good to know

  • The response is an HTML page, not JSON. The form asks for the phone number (phone) and how to receive the OTP (channel), and posts them to your loginURL.