検証コードを確認する
ユーザーが入力した認証コードを確認してください。認証コードは 送信.これにより、Vonageは成功したリクエストの数と 不正使用からの保護 プラットフォームの
必要に応じて、サンプルコードの以下の変数を独自の値に置き換えてください:
| キー | 説明 |
|---|---|
REQUEST_ID | The ID of the Verify request (this is returned in the API response when you send a verification code) |
JWT | Used to authenticate your request. See Authentication for more information, including how to generate a JWT. |
VONAGE_APPLICATION_PRIVATE_KEY_PATH | Private key path. |
VONAGE_APPLICATION_ID | The Vonage Application ID. |
CODE | The code the user supplies as having been sent to them |
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named check-verification-code.js and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
Create a class named CheckVerificationCode and add the following code to the main method:
Write the code
Add the following to the main method of the CheckVerificationCode class:
Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
apply plugin: 'application'
mainClassName = project.hasProperty('main') ? project.getProperty('main') : ''Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.verify with the package containing CheckVerificationCode:
Prerequisites
Add the following to build.gradle:
Create a class named CheckVerificationCode and add the following code to the main method:
Write the code
Add the following to the main method of the CheckVerificationCode class:
Run your code
We can use the アプリケーション plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.verify2 with the package containing CheckVerificationCode:
Prerequisites
Create a file named VerifyCodeRequest.cs and add the following code:
Add the following to VerifyCodeRequest.cs:
Prerequisites
Create a file named send_code.php and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named check.rb and add the following code:
Run your code
Save this file to your machine and run it: