curl --request POST \
--url https://platform.otpless.app/v1/telecom/call-forwarding-check \
--header 'Content-Type: application/json' \
--header 'clientId: <api-key>' \
--header 'clientSecret: <api-key>' \
--data '
{
"phoneNumber": "917020141726"
}
'import requests
url = "https://platform.otpless.app/v1/telecom/call-forwarding-check"
payload = { "phoneNumber": "917020141726" }
headers = {
"clientId": "<api-key>",
"clientSecret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
clientId: '<api-key>',
clientSecret: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '917020141726'})
};
fetch('https://platform.otpless.app/v1/telecom/call-forwarding-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.otpless.app/v1/telecom/call-forwarding-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '917020141726'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"clientId: <api-key>",
"clientSecret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.otpless.app/v1/telecom/call-forwarding-check"
payload := strings.NewReader("{\n \"phoneNumber\": \"917020141726\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("clientId", "<api-key>")
req.Header.Add("clientSecret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.otpless.app/v1/telecom/call-forwarding-check")
.header("clientId", "<api-key>")
.header("clientSecret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"917020141726\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.otpless.app/v1/telecom/call-forwarding-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["clientId"] = '<api-key>'
request["clientSecret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"917020141726\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"callForwarding": false,
"callForwardingType": "inactive",
"phoneDetail": {
"operator": "AIRTEL",
"countryCode": "91",
"country": "IN",
"type": "MOBILE",
"homeOperator": "VI",
"isPorted": true,
"location": "India",
"timeZones": [
"Asia/Kolkata"
]
}
}Call Forwarding Check
Check whether call forwarding is active on a phone number. Use as a pre-authentication risk signal for fraud prevention.
curl --request POST \
--url https://platform.otpless.app/v1/telecom/call-forwarding-check \
--header 'Content-Type: application/json' \
--header 'clientId: <api-key>' \
--header 'clientSecret: <api-key>' \
--data '
{
"phoneNumber": "917020141726"
}
'import requests
url = "https://platform.otpless.app/v1/telecom/call-forwarding-check"
payload = { "phoneNumber": "917020141726" }
headers = {
"clientId": "<api-key>",
"clientSecret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
clientId: '<api-key>',
clientSecret: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '917020141726'})
};
fetch('https://platform.otpless.app/v1/telecom/call-forwarding-check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.otpless.app/v1/telecom/call-forwarding-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '917020141726'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"clientId: <api-key>",
"clientSecret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.otpless.app/v1/telecom/call-forwarding-check"
payload := strings.NewReader("{\n \"phoneNumber\": \"917020141726\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("clientId", "<api-key>")
req.Header.Add("clientSecret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.otpless.app/v1/telecom/call-forwarding-check")
.header("clientId", "<api-key>")
.header("clientSecret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"917020141726\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.otpless.app/v1/telecom/call-forwarding-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["clientId"] = '<api-key>'
request["clientSecret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"917020141726\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"callForwarding": false,
"callForwardingType": "inactive",
"phoneDetail": {
"operator": "AIRTEL",
"countryCode": "91",
"country": "IN",
"type": "MOBILE",
"homeOperator": "VI",
"isPorted": true,
"location": "India",
"timeZones": [
"Asia/Kolkata"
]
}
}Why check call forwarding?
Why check call forwarding?
How to interpret the response
How to interpret the response
| Field | Value | Meaning |
|---|---|---|
success | true | Check completed. Use callForwarding for the result. |
success | false | Check could not be completed (e.g. operator not supported). Inspect the error object. |
callForwarding | true | Call forwarding is active on the number. Treat this as a risk signal. |
callForwarding | false | No call forwarding detected on the number. |
callForwardingType | unconditional | All calls are forwarded regardless of device state (blanket forwarding). |
callForwardingType | inactive | No call forwarding is set up on the number. |
callForwardingType | conditional_busy | Calls are forwarded only when the line is busy. |
callForwardingType | conditional_no_answer | Calls are forwarded only when there’s no answer within the ring timeout. |
callForwardingType | conditional_not_reachable | Calls are forwarded only when the device is unreachable (off, no signal, airplane mode). |
callForwarding is true for every callForwardingType value except inactive — it’s effectively derived as callForwardingType != "inactive".When success is false, callForwarding and callForwardingType are omitted.What is phoneDetail?
What is phoneDetail?
phoneDetail contains enriched metadata about the phone number returned alongside the forwarding result — including operator, country, line type, and time zones. All fields are omitted when not available for the given number or operator.| Field | Type | Description |
|---|---|---|
operator | string | Current network operator (e.g. JIO, AIRTEL, VI) |
countryCode | string | Numeric country code (e.g. 91) |
country | string | ISO 3166-1 alpha-2 country code (e.g. IN) |
type | string | Phone line type (e.g. MOBILE) |
homeOperator | string | Registered operator, which may differ from operator if the number is roaming or ported |
isPorted | boolean | true if the number has been ported away from its home operator |
location | string | Location string for the number’s registered area |
timeZones | string[] | IANA time zones for the number’s registered location |
Authorizations
OTPless API Client ID
OTPless API Client Secret
Body
Phone number including country code, without plus sign. Example: 917020141726 for +91 70201 41726.
"917020141726"
Response
HTTP 200 — Request accepted. Inspect success in the body:
success: true— Check completed. UsecallForwardingto determine result.success: false— Check could not be completed. Inspecterrorfor details.
true if the check completed successfully. false if the check could not be completed — inspect the error object for details.
true if call forwarding is currently active on the number. false if it is not. Omitted when success is false.
Specific forwarding state. unconditional — all calls forwarded regardless of device state. inactive — no forwarding set up. conditional_busy — forwarded only when the line is busy. conditional_no_answer — forwarded only when there's no answer within the ring timeout. conditional_not_reachable — forwarded only when the device is unreachable (off, no signal, airplane mode). callForwarding is true for every value except inactive. Omitted when success is false.
unconditional, inactive, conditional_busy, conditional_no_answer, conditional_not_reachable "inactive"
Enriched phone metadata. Fields are omitted when not available for the given number or operator.
Show child attributes
Show child attributes
Error object returned inside a 200 response when success is false.
Show child attributes
Show child attributes