Skip to main content

Vonage Number Verification Network API Client

This package (vonage-network-number-verification) allows you to verify a mobile device. It verifies the phone number linked to the SIM card in a device which is connected to a mobile data network, without any user input.

This package is not intended to be used directly, instead being accessed from an enclosing SDK package. Thus, it doesn't require manual installation or configuration unless you're using this package independently of an SDK.

For full API documentation, refer to the Vonage developer documentation.

Registering to Use the Network Number Verification API

To use this API, you must first create and register a business profile with the Vonage Network Registry. This documentation page explains how this can be done. You need to obtain approval for each network and region you want to use the APIs in.

Installation

Install from the Python Package Index with pip:

pip install vonage-network-number-verification

Usage

It is recommended to use this as part of the vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.

The Vonage Number Verification API uses Oauth2 authentication, which this SDK will also help you to do. Verifying a number has 3 stages:

  1. Get an OIDC URL for use in your front-end application
  2. Use this URL in your own application to get an authorization code
  3. Make a Number Verification Request using this code to verify the number

This package contains methods to help with Steps 1 and 3.

Get an OIDC URL

from vonage_network_number_verification import CreateOidcUrl

url_options = CreateOidcUrl(
    redirect_uri='https://example.com/redirect',
    state='c9896ee6-4ff8-464c-b393-d56d6e638f88',
    login_hint='+990123456',
)

url = number_verification.get_oidc_url(url_options)
print(url)

Get your user's device to follow this URL and a code to use for number verification will be returned in the final redirect query parameters. Note: your user must be connected to their mobile network.

Make a Number Verification Request

from vonage_network_number_verification import NumberVerificationRequest

response = number_verification.verify(
    NumberVerificationRequest(
        code='code',
        redirect_uri='https://example.com/redirect',
        phone_number='+990123456',
    )
)
print(response.device_phone_number_verified)

Metadata

Release files for vonage-network-number-verification 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vonage-network-number-verification 1.0.2
File Size Uploaded
vonage_network_number_verification-1.0.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vonage-network-number-verification 1.0.2
File Interpreter ABI Platform
vonage_network_number_verification-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / vonage_network_number_verification-1.0.2.tar.gz

Download URL vonage_network_number_verification-1.0.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b67fdeb760f80adc203f735a7ee8f5a07f6f45f35365e496f620c5300a0703ec
BLAKE2b-256 checksum
How to use checksums
411be51dc0482da370cf736e5a8a178a7afe99ec2874a39e37dd7bfc28644b4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.4

Release files / vonage_network_number_verification-1.0.2-py3-none-any.whl

Download URL vonage_network_number_verification-1.0.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da28cd262c0b74f078b6b6d31f36736b270365f532cfe0d2f21b383fb5340d77
BLAKE2b-256 checksum
How to use checksums
8aed2c6bad16f220f63ec39ab128ac9fa61d809ecb13194c360d0b1b119c38c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page