Skip to contentSkip to navigationSkip to topbar
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 LookupLink to code sample: Identity Match 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
12
.phoneNumbers("+14159929960")
13
.fetch({
14
addressCountryCode: "US",
15
addressLine1: "321 Main Street",
16
addressLine2: "Suite 2",
17
city: "New York",
18
dateOfBirth: "19901214",
19
fields: "identity_match",
20
firstName: "John",
21
lastName: "Doe",
22
nationalId: "YZ3456883",
23
postalCode: "10021",
24
state: "NY",
25
});
26
27
console.log(phoneNumber.callingCountryCode);
28
}
29
30
fetchPhoneNumber();

Output

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": null
26
},
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
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.