Check the OTP a user typed in.
https://otp_api.telcomw.com/verifySend the parameters in the URL (query parameters).
| Parameter | Required | Description |
id |
YES | The id you used when you requested the OTP. |
ref |
YES | The reference returned when the OTP was requested. |
otp |
YES | The OTP the user typed in. |
curl --location --request GET 'https://otp_api.telcomw.com/verify?id=123456&ref=D3F66B481CA89BD9C5F6E47F4645EEDC&otp=2337'
curl --location --request GET "https://otp_api.telcomw.com/verify?id=123456&ref=D3F66B481CA89BD9C5F6E47F4645EEDC&otp=2337"
<?php
$ch = curl_init('https://otp_api.telcomw.com/verify?id=123456&ref=D3F66B481CA89BD9C5F6E47F4645EEDC&otp=2337');
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/verify',
params: {
'id': '123456',
'ref': 'D3F66B481CA89BD9C5F6E47F4645EEDC',
'otp': '2337'
}
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
params = {
'id': '123456',
'ref': 'D3F66B481CA89BD9C5F6E47F4645EEDC',
'otp': '2337'
}
response = requests.request('GET', 'https://otp_api.telcomw.com/verify', params=params)
print(response.json())
The response is JSON.
{
"status": "success",
"message": "The OTP has been verified successfully",
"route": "verify"
}
{
"status": "error",
"message": "The OTP submitted is invalid, please double check",
"route": "verify"
}