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

Testing Identity Match 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.


Identity Match Magic Numbers

identity-match-magic-numbers page anchor

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/OutputsPhone NumberFirstNameLastNameAddressLine1CityStatePostalCodeNationalIDDateOfBirthAddressCountryCodeSummary Score
Input+12345678900JohnTwilion123 Magic StOwl CityCA1234512345678920080313USnull
Output+12345678900exact_matchexact_matchexact_matchexact_matchexact_matchexact_matchexact_matchexact_matchexact_match100
Input+12345678901JohTwil123 Magic StOwl CityCA1234512345678920080313USnull
Output+12345678901high_partial_matchhigh_partial_matchexact_matchexact_matchexact_matchexact_matchexact_matchexact_matchexact_match100
Input+12345678924JohnMagic123 Magic StMagic CityNYM4 G1590123456720000425USnull
Output+12345678924exact_matchno_matchexact_matchno_matchno_matchno_matchexact_matchno_matchno_match80
Input+12345678904JohnTwilion456 Twilio DrMagic CityNYM4 G1590123456720000425GBnull
Output+12345678904exact_matchexact_matchno_matchno_matchno_matchno_matchno_matchno_matchno_match40
Input+12345678907CharlesTwilion456 Twilio DrMagic CityCA4567812345678920000425USnull
Output+12345678907no_matchexact_matchno_matchno_matchexact_matchno_matchno_matchno_matchexact_match20
Input+12345678912CharlesMagic456 Twilio DrMagic CityNY4567890123456720000425USnull
Output+12345678912no_matchno_matchno_matchno_matchno_matchno_matchno_matchno_matchno_match0
Input+12345678913CharlesMagic123 Owl DrTwilio CityCA1234523456789119730403USnull
Output+12345678913no_data_availableno_data_availableno_data_availableno_data_availableno_data_availableno_data_availableno_data_availableno_data_availableno_data_available0

These phone number examples show different types of errors when using Identity Match.

ValueError Code
+1234567891460001
+1234567891560003
+1234567891660006
+1234567891760008
+1234567891860607
+1234567891960608
+1234567892060617
+1234567892160618

Identity Match Lookup

identity-match-lookup page anchor

Valid phone number (paid)

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

_30
// Download the helper library from https://www.twilio.com/docs/node/install
_30
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_30
_30
// Find your Account SID and Auth Token at twilio.com/console
_30
// and set the environment variables. See http://twil.io/secure
_30
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_30
const authToken = process.env.TWILIO_AUTH_TOKEN;
_30
const client = twilio(accountSid, authToken);
_30
_30
async function fetchPhoneNumber() {
_30
const phoneNumber = await client.lookups.v2
_30
.phoneNumbers("+14159929960")
_30
.fetch({
_30
addressCountryCode: "US",
_30
addressLine1: "321 Main Street",
_30
addressLine2: "Suite 2",
_30
city: "New York",
_30
dateOfBirth: "19901214",
_30
fields: "identity_match",
_30
firstName: "John",
_30
lastName: "Doe",
_30
nationalId: "YZ3456883",
_30
postalCode: "10021",
_30
state: "NY",
_30
});
_30
_30
console.log(phoneNumber.callingCountryCode);
_30
}
_30
_30
fetchPhoneNumber();

Output

_32
{
_32
"calling_country_code": "1",
_32
"country_code": "US",
_32
"phone_number": "+14159929960",
_32
"national_format": "(415) 992-9960",
_32
"valid": true,
_32
"validation_errors": [],
_32
"caller_name": null,
_32
"sim_swap": null,
_32
"call_forwarding": null,
_32
"line_status": null,
_32
"line_type_intelligence": null,
_32
"identity_match": {
_32
"first_name_match": "exact_match",
_32
"last_name_match": "high_partial_match",
_32
"address_lines_match": "no_match",
_32
"city_match": "no_match",
_32
"state_match": "high_partial_match",
_32
"postal_code_match": "no_data_available",
_32
"address_country_match": "exact_match",
_32
"national_id_match": "exact_match",
_32
"date_of_birth_match": "exact_match",
_32
"summary_score": 90,
_32
"error_code": null,
_32
"error_message": null
_32
},
_32
"reassigned_number": null,
_32
"sms_pumping_risk": null,
_32
"phone_number_quality_score": null,
_32
"pre_fill": null,
_32
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
_32
}


Rate this page: