TwilioKelley Robinson, Matthew SetterTutorial
How to Confirm Phone Number Ownership with Lookup Identity Match in PHP
Summary
The post presents a PHP signup flow that uses Twilio Lookup Identity Match to confirm whether submitted identity details correspond to a phone number and to reduce signup fraud. Identity Match performs a zero-knowledge match against authoritative sources such as mobile carrier records, using supplied fields including names, addresses, national IDs, or dates of birth. The implementation builds on a Slim PHP project, adds Twig form handling and the Twilio REST client, then sends the phone number, first name, and last name through the Lookup API. Registration succeeds only when the number is valid and both names return exact_match or high_partial_match; otherwise, the form displays an instruction to provide information for a phone number the user owns.
Context
The post addresses fake accounts and signup fraud by describing a way to confirm that a person is linked to the phone number provided. It positions Identity Match as a lower-friction alternative to credit bureau and document verification for this type of confirmation.
Approach / What changed
The example extends a Slim PHP starter project with a Twig signup form, environment-based Twilio credentials, and the Twilio REST client. On POST, it sends the phone number, first name, and last name to the Lookup API with the identity_match field, then checks validity and the returned name-match values.
Takeaways
The sample request uses the Lookup API's identity_match field with a phone number, first and last name, and optional identity attributes such as address and date of birth.
The PHP example uses Slim, Twig, Composer, and Twilio's REST client; it reads TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN from the environment.
The success check requires numberDetails->valid plus exact_match or high_partial_match for both first_name_match and last_name_match; other response values include no_match and no_data_available.
Source and freshness
- Source
- twilio.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.