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 before testing phone numbers.
These phone numbers have simulated information for the following inputs which is for testing the Identity Match feature. To test Identity Match with Magic Numbers, you will be required to enter the phone number, FirstName, LastName, AddressLine1, City, State, PostalCode, NationalId, DateOfBirth, and AddressCountryCode. In a production environment, you may only want to check a subset of these parameters, but when using Magic Numbers you will need to use all of the provided parameters.
*Note: The first magic number shows an example of a perfect match. The rest of these magic numbers are examples of when not all parameters match the data set. Please do not modify the input parameters because the output will not reflect your changes.
Below are the Phone Numbers for Identity Match, along with this Inputs/Outputs:
Inputs/Outputs | Phone Number | FirstName | LastName | AddressLine1 | City | State | PostalCode | NationalID | DateOfBirth | AddressCountryCode | Summary Score |
---|---|---|---|---|---|---|---|---|---|---|---|
Input | +12345678900 | John | Twilion | 123 Magic St | Owl City | CA | 12345 | 123456789 | 20080313 | US | null |
Output | +12345678900 | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | 100 |
Input | +12345678901 | Joh | Twil | 123 Magic St | Owl City | CA | 12345 | 123456789 | 20080313 | US | null |
Output | +12345678901 | high_partial_match | high_partial_match | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | exact_match | 100 |
Input | +12345678924 | John | Magic | 123 Magic St | Magic City | NY | M4 G15 | 901234567 | 20000425 | US | null |
Output | +12345678924 | exact_match | no_match | exact_match | no_match | no_match | no_match | exact_match | no_match | no_match | 80 |
Input | +12345678904 | John | Twilion | 456 Twilio Dr | Magic City | NY | M4 G15 | 901234567 | 20000425 | GB | null |
Output | +12345678904 | exact_match | exact_match | no_match | no_match | no_match | no_match | no_match | no_match | no_match | 40 |
Input | +12345678907 | Charles | Twilion | 456 Twilio Dr | Magic City | CA | 45678 | 123456789 | 20000425 | US | null |
Output | +12345678907 | no_match | exact_match | no_match | no_match | exact_match | no_match | no_match | no_match | exact_match | 20 |
Input | +12345678912 | Charles | Magic | 456 Twilio Dr | Magic City | NY | 45678 | 901234567 | 20000425 | US | null |
Output | +12345678912 | no_match | no_match | no_match | no_match | no_match | no_match | no_match | no_match | no_match | 0 |
Input | +12345678913 | Charles | Magic | 123 Owl Dr | Twilio City | CA | 12345 | 234567891 | 19730403 | US | null |
Output | +12345678913 | no_data_available | no_data_available | no_data_available | no_data_available | no_data_available | no_data_available | no_data_available | no_data_available | no_data_available | 0 |
These phone number examples show different types of errors when using Identity Match.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchPhoneNumber() {11const phoneNumber = await client.lookups.v212.phoneNumbers("+14159929960")13.fetch({14addressCountryCode: "US",15addressLine1: "321 Main Street",16addressLine2: "Suite 2",17city: "New York",18dateOfBirth: "19901214",19fields: "identity_match",20firstName: "John",21lastName: "Doe",22nationalId: "YZ3456883",23postalCode: "10021",24state: "NY",25});2627console.log(phoneNumber.callingCountryCode);28}2930fetchPhoneNumber();
1{2"calling_country_code": "1",3"country_code": "US",4"phone_number": "+14159929960",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": {14"first_name_match": "exact_match",15"last_name_match": "high_partial_match",16"address_lines_match": "no_match",17"city_match": "no_match",18"state_match": "high_partial_match",19"postal_code_match": "no_data_available",20"address_country_match": "exact_match",21"national_id_match": "exact_match",22"date_of_birth_match": "exact_match",23"summary_score": 90,24"error_code": null,25"error_message": null26},27"reassigned_number": null,28"sms_pumping_risk": null,29"phone_number_quality_score": null,30"pre_fill": null,31"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"32}