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.
- Create a Nexmo account - so that you can access your API key and secret to authenticate requests.
- Rent a Nexmo Number - to send verification requests from.
- Install a Server SDK - for your chosen programming language.
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:
RECIPIENT_NUMBER placeholder with the number you are attempting to verify. For example: 447700900001.
All phone numbers must be in E.164 format.
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.
REQUEST_ID placeholder with the
request_id returned by the initial verification request.