Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Call Forwarding


Lookup's Call Forwarding package allows you to get the unconditional call forwarding status of a mobile phone number.

Call Forwarding Lookups are billed per Lookup, even if data may not be available. Currently, requesting Call Forwarding Lookups for unsupported carriers will return null values, but will not be billed.

To make a Call Forwarding request, add call_forwarding to the optional query parameter Fields when making a standard Lookup request.


_10
curl -X GET "https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}?Fields=call_forwarding" \ -u
_10
$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Coverage and Limitations: Only numbers owned by major carriers in the United Kingdom are supported.

Release Stage and Access: Private Beta, please submit this form(link takes you to an external page) to contact sales. Requires carrier approvals.


Response properties

response-properties page anchor

The following additional properties are returned for a Call Forwarding request.

PropertyDescription
CallForwardingStatusA Boolean value indicating unconditional call forwarding is currently enabled for the requested mobile phone number (true) or is not (false).
ErrorCodeThe error code, if any, associated with your request.

Call Forwarding Lookup

call-forwarding-lookup page anchor

Call forwarding enabled (paid)

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
import twilio from "twilio";
_14
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = twilio(accountSid, authToken);
_14
_14
const phoneNumber = await client.lookups.v2
_14
.phoneNumbers("+447772000001")
_14
.fetch({ fields: "call_forwarding" });
_14
_14
console.log(phoneNumber.callForwarding);

Output

_22
{
_22
"calling_country_code": "44",
_22
"country_code": "GB",
_22
"phone_number": "+447772000001",
_22
"national_format": "07772 000001",
_22
"valid": true,
_22
"validation_errors": null,
_22
"caller_name": null,
_22
"sim_swap": null,
_22
"call_forwarding": {
_22
"call_forwarding_status": true,
_22
"error_code": null
_22
},
_22
"line_status": null,
_22
"line_type_intelligence": null,
_22
"identity_match": null,
_22
"reassigned_number": null,
_22
"sms_pumping_risk": null,
_22
"phone_number_quality_score": null,
_22
"pre_fill": null,
_22
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
_22
}


Rate this page: