Before you Begin

What are Code Snippets?

Code snippets are short pieces of code you can reuse in your own applications. The code snippets use code from example repositories.

Please read this information carefully before attempting to use the code snippets.


  1. Create a Nexmo account - so that you can access your API key and secret to authenticate requests.
  2. Rent a Nexmo Number - to send verification requests from.
  3. Install a REST Client library - for your chosen programming language.

Replaceable variables

The code snippets use placeholders for variable values that you must replace with your own details.


The following variables are specific to your Nexmo account. You can view them in the developer dashboard:

Key Description


Replace the RECIPIENT_NUMBER placeholder with the number you are attempting to verify. For example: 447700900001.

All phone numbers must be in E.164 format.

Request ID

When you make an initial verification request, it returns a request_id. You use this in subsequent calls to the Verify API to identify a specific verification attempt.

Replace the REQUEST_ID placeholder with the request_id returned by the initial verification request.