这份文档还在翻译中,预期年底前完成。欢迎您提供宝贵的意见及建议。
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.
Prerequisites
- Create a Vonage account - so that you can access your API key and secret to authenticate requests.
- Rent a Vonage Number - to send verification requests from.
- Install a Server SDK - for your chosen programming language.
Replaceable variables
The code snippets use placeholders for variable values that you must replace with your own details.
Account
The following variables are specific to your Vonage account. You can view them in the developer dashboard:
Key | Description |
---|---|
VONAGE_API_KEY |
Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET |
Your Vonage API secret (also available on your dashboard). |
Numbers
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.