---
title: "How to Confirm Phone Number Ownership with Lookup Identity Match in Python"
description: "The tutorial shows how to use Twilio Lookup Identity Match in Python to confirm that signup information is associated with a phone number and reduce signup fraud. It builds a Flask application that accepts an E.164-formatted number, first name, and last name, then calls the Lookup API with fields=\"identity_match\" and the supplied identity attributes. The response exposes statuses including exact_match, high_partial_match, no_match, and no_data_available; the example accepts a result only when the number is valid and both names are exact or high partial matches. The implementation covers project setup with Flask, twilio, and python-dotenv, environment-based credentials, an intl-tel-input form, and frontend handling for success and failure messages. It also notes that Identity Match can use combinations of name, address, national ID, or date of birth, and points to other Lookup packages such as Line Type Intelligence and SIM swap detection."
---

# How to Confirm Phone Number Ownership with Lookup Identity Match in Python

[Twilio](https://yomu.fyi/company/twilio) · Kelley Robinson, Dylan Frankcom · Aug 28, 2026

**Type:** Tutorial

## Summary

The tutorial shows how to use Twilio Lookup Identity Match in Python to confirm that signup information is associated with a phone number and reduce signup fraud. It builds a Flask application that accepts an E.164-formatted number, first name, and last name, then calls the Lookup API with fields="identity\_match" and the supplied identity attributes. The response exposes statuses including exact\_match, high\_partial\_match, no\_match, and no\_data\_available; the example accepts a result only when the number is valid and both names are exact or high partial matches. The implementation covers project setup with Flask, twilio, and python-dotenv, environment-based credentials, an intl-tel-input form, and frontend handling for success and failure messages. It also notes that Identity Match can use combinations of name, address, national ID, or date of birth, and points to other Lookup packages such as Line Type Intelligence and SIM swap detection.

## Context

The post addresses fake accounts and signup fraud by using phone numbers to confirm that a real person is linked to the number provided. It presents Identity Match as a lower-friction alternative to credit bureau and document verification for relevant trust and AML-related use cases.

## Approach / What changed

The implementation creates a Flask app with a phone-number form, collects first and last names, and sends them to Twilio Lookup with the Identity Match field. It evaluates the returned name-match statuses alongside phone-number validity, accepting exact\_match and high\_partial\_match for both names before displaying the result in the frontend.

## Takeaways

- Identity Match performs a zero-knowledge match between a phone number and authoritative data sources such as mobile carrier records.
- The example considers verification successful only when the Lookup result is valid and both first\_name\_match and last\_name\_match are exact\_match or high\_partial\_match.
- Identity Match accepts combinations of name, address, national ID, and date of birth; the response can also report no\_match, no\_data\_available, or null when an input was not supplied.

**Tags:** [API](https://yomu.fyi/topic/api), [Flask](https://yomu.fyi/topic/flask), [Python](https://yomu.fyi/topic/python), [Twilio Lookup](https://yomu.fyi/topic/twilio-lookup)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/product/confirm-phone-number-ownership-lookup-identity-match-python)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/product/confirm-phone-number-ownership-lookup-identity-match-python
- Ingested by Yomu: 2026-09-09T13:35:44.461Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/product/confirm-phone-number-ownership-lookup-identity-match-python)
