Phone Number Verification Quick Start Guide

Dependencies

The following 4 dependencies are required before you can use the Phone Number Verification Service

1) A Syniverse Developer Community Account
If you don’t have one then sign up at https://developer.syniverse.com/

2) Enabled Service Offerings for Phone Number Verification and Developer Community Gateway
If you haven’t already enabled these then go to the Service Offerings tab here and click on the link for each service offering.
Expand > Subscriptions and then click Subscribe…. When subscribing you need to select the account to use from the drop down..














Screenshot showing how to subscribe to Phone Number Verification Service

3) An Application with the SDC Gateway Services and Phone Number Verification Services APIs enabled.
You can either create a new one using the New application button, or edit an existing one to enable the correct APIs.
Once enabled then it is recommended to regenerate the Access Token. This option can be found by expanding > Auth Keys.

screen shot showing how to enable APIs when creating an application

4) The Access Token for the Application.
This can be found by clicking the wheel in the top right hand side of the Application and selecting Keys.

This will then list the keys including the Access Token.

screen shot showing to access Access Token for an application

Looking up a Phone Number using cURL

If you are comfortable using CURL then you can use the following cURL command

curl -X GET   -H "Authorization: Bearer {token}"    "https://api.syniverse.com/numberidentity/v3/numbers/{PHONE NUMBER}

The Token will be the Access Token from the Application.

The Phone Number will be a url encoded phone number in international format.

For example, to look up a UK number 07860 438 585, it should be converted to the format +44 7860 438 585. When it is encoded then it will read

"https://api.syniverse.com/numberidentity/v3/numbers/%2B447860438585"

Looking up Phone Numbers using Python

If you are familiar with Python you can quickly get up and running using our code samples on Github.

Go to the Phone Number Verification Repository where you will find both a Readme with instructions and a simply python script which you can use to look up phone numbers. Only one change is needed to the script, which is to add your Access Token.

You can access the code by either downloading the code from the website, or by forking the repository and then cloning the fork to your local workspace.

The code is tested in python 2.7.13 and uses the Requests library. If you don’t already have Requests already installed, then instructions on how to install are here.

The example already includes a range of mobile, landline and invalid phone numbers, and you can easily add your own.

The results from running the example are shown below.

python.exe phone-number-check-example-external.py
status code: 200
response: {"numberidentity":{"number":"+447860438585","validity":"true","carrier_id":"18149","carrier_name":"VODAFONE(C&W)","number_type":"M","country_iso_code":"GBR","country":"United Kingdom","carrier_mcc":"234","carrier_mnc":"15","account_type":"","last_known_event":"None","previous_carrier_id":"","previous_carrier_name":""},"tracking_id":"200290035881499172651890"}
status code: 200
response: {"numberidentity":{"number":"+447513005998","validity":"true","carrier_id":"8584","carrier_name":"TELEFONICA UK","number_type":"M","country_iso_code":"GBR","country":"United Kingdom","carrier_mcc":"234","carrier_mnc":"10","account_type":"","last_known_event":"None","previous_carrier_id":"","previous_carrier_name":""},"tracking_id":"200290035881499172652541"}
status code: 200
response: {"numberidentity":{"number":"+442079202200","validity":"true","carrier_id":"11500","carrier_name":"BT","number_type":"L","country_iso_code":"GBR","country":"United Kingdom","account_type":"","last_known_event":"None","previous_carrier_id":"","previous_carrier_name":""},"tracking_id":"200290035881499172653146"}
status code: 200
response: {"numberidentity":{"number":"+446543211234","validity":"false","carrier_id":"","carrier_name":"","number_type":"","country_iso_code":"","country":"","carrier_mcc":"","carrier_mnc":"","account_type":"","last_known_event":"","porting_date":"","previous_carrier_id":"","previous_carrier_name":"","deactivation_date":""},"tracking_id":"200290035881499172653737"}
status code: 200
response: {"numberidentity":{"number":"+18136375000","validity":"true","carrier_id":"21568","carrier_name":"ZIPWHIP\/FRONTIER COMMUNICATIONS SMSENABLED - FRONTIER COMMUNICATIONS - SYNIVERSE","number_type":"L","country_iso_code":"USA","country":"United States","account_type":"","last_known_event":"Ported","porting_date":"2008-05-09T00:00Z","previous_carrier_id":"","previous_carrier_name":""},"tracking_id":"200290035881499172654492"}
Process finished with exit code 0

Copyright © 2017 Syniverse Technologies