Skip to main content
Version: Node.js

Quickstart

This guide will help you get started with the Number Verify API. You will learn how to initialize the SDK, and verify a phone number.

Number verification checks that a phone is really who they say they are by comparing the phone number to check with a mobile device's identity through a mobile access token.

Because of this the process is split into two steps:

  1. Retrieve a mobile access token: This is done by sending a request from the mobile device itself from the telecom operator's network.
  2. Verify the phone number: This is done by sending the mobile access token and the phone number to the telecom operator.
info

The flow is meant to be done on a mobile device, but for the sake of this guide, we will create a simple web server and deploy it to allow you to send a request from a mobile web browser.

Prerequisites

Before you begin, you need to have the following:

Step 1: Clone the Quickstart Project

To get started, clone the project repository from GitHub.

git clone https://github.com/GlideApis/number-verify-starter-web-node.git
cd number-verify-starter-web-node

This project contains a simple web server and frontend client to demonstrate the number verification process.

Step 2: Retrieve your credentials

From the Number Verification service page (Which you can get to from here by clicking "Manage on Provider") there is a button "Copy .env file" under the "Credentials" section that will copy the credentials in the correct format to create an .env file at the root of the project.

It should look like this:

.env
GLIDE_CLIENT_ID=<YOUR_CLIENT_ID>
GLIDE_CLIENT_SECRET=<YOUR_CLIENT_SECRET>

Step 3: Deploy the Project

This project comes with a deployment script that will create a new Google Cloud Run service and build / deploy the server.

To build the project run the deploy npm script:

npm run deploy

Follow the prompts as needed and this will build the project, creating a new Docker image in your GCP account and a new Cloud Run service using this image.

When complete you will see the URL of the deployed service as-well as a redirect URL for the next step.

Step 4: Update the Redirect URL

Performing a 3-legged authentication with the end-user's device requires redirecting the user to the telecom operator's authentication server for identification. Once the user has been authenticated, the telecom operator will redirect the user back to your application.

This is configured by defining a redirect URL in the service dashboard. From the same area where you retrieved your credentials in the input field marked "Redirect URL" there is a button to edit this value.

Update the redirect URL to the URL printed by the deployment script in the previous step.

More info

With the server deployed and the redirect URL updated you can now test the number verification process. Open the URL of the deployed server and you will see a simple form to enter a phone number and start the verification process. If you are testing this on a desktop browser or over WiFi you can use the Glide Test Lab number +555123456789 which will work from any device.

Next Steps

Now that you have verified a phone number you can start integrating the number verification process into your application. For more information on the SDK you can refer to the SDK Reference.