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

Testing Reassigned Number with Magic Numbers


(warning)

Warning

Please review the Magic Numbers for Lookup and use your testing credentials for the correct Region when testing phone numbers. If you use your production credentials then the phone numbers do not display the correct responses shown below.

Note: Your testing credentials are region specific so make sure you have selected the region you want to test in the top right corner of the Auth Tokens page of your Console(link takes you to an external page) before testing phone numbers.


Reassigned Numbers Magic Numbers

reassigned-numbers-magic-numbers page anchor

These phone numbers have simulated information for the following inputs which is for testing Reassigned Number feature. To test phone numbers for Reassigned Number, you will be required to enter the phone number and last verified date.

Note: These phone numbers are examples only and do not include real time data. Please do not modify the input parameters (phone number and LastVerifiedDate) because the output parameter will not reflect your changes.

Below are the Phone Numbers for Reassigned Number, along with their Input/Outputs:

below-are-the-phone-numbers-for-reassigned-number-along-with-their-inputoutputs page anchor

These phone number examples show the inputs (phone number and LastVerifiedDate) and their output (IsReassigned).

Phone NumberLastVerifiedDateIsReassignedNumber
+12345678900"2022-11-12"no
+12345678904"2021-12-27"yes

These phone number examples show different types of errors when using Reassigned Number.

ValueError Code
+1234567890560004
+1234567890660607
+1234567890760617
+1234567890860618

Reassigned Number Lookup

reassigned-number-lookup page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.lookups.v2.phoneNumbers('4159929960')
_10
.fetch({fields: 'reassigned_number', lastVerifiedDate: '20211015'})
_10
.then(phone_number => console.log(phone_number.reassignedNumber));

Output

_23
{
_23
"calling_country_code": "1",
_23
"country_code": "US",
_23
"phone_number": "4159929960",
_23
"national_format": "(415) 992-9960",
_23
"valid": true,
_23
"validation_errors": [],
_23
"caller_name": null,
_23
"sim_swap": null,
_23
"call_forwarding": null,
_23
"line_status": null,
_23
"line_type_intelligence": null,
_23
"identity_match": null,
_23
"reassigned_number": {
_23
"last_verified_date": "2019-09-24",
_23
"is_number_reassigned": "no",
_23
"error_code": null
_23
},
_23
"sms_pumping_risk": null,
_23
"phone_number_quality_score": null,
_23
"pre_fill": null,
_23
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
_23
}


Rate this page: