Skip to contentSkip to navigationSkip to topbar
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 LookupLink to code sample: Reassigned Number Lookup
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPhoneNumber() {
11
const phoneNumber = await client.lookups.v2.phoneNumbers("4159929960").fetch({
12
fields: "reassigned_number",
13
lastVerifiedDate: "20211015",
14
});
15
16
console.log(phoneNumber.reassignedNumber);
17
}
18
19
fetchPhoneNumber();

Output

1
{
2
"calling_country_code": "1",
3
"country_code": "US",
4
"phone_number": "4159929960",
5
"national_format": "(415) 992-9960",
6
"valid": true,
7
"validation_errors": [],
8
"caller_name": null,
9
"sim_swap": null,
10
"call_forwarding": null,
11
"line_status": null,
12
"line_type_intelligence": null,
13
"identity_match": null,
14
"reassigned_number": {
15
"last_verified_date": "2019-09-24",
16
"is_number_reassigned": "no",
17
"error_code": null
18
},
19
"sms_pumping_risk": null,
20
"phone_number_quality_score": null,
21
"pre_fill": null,
22
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
23
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.