検証コードを確認する

ユーザーが入力した認証コードを確認します。認証コードは request_id を受信した。 検証コードが送信された.

:常に 認証コードを確認する その後 送信.これにより、Vonageは成功したリクエストの数と 不正使用からの保護 プラットフォームの

サンプルコードの以下の変数を、独自の値に置き換えてください:

キー説明
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

REQUEST_ID

The ID of the Verify request (this is returned in the API response when you send a verification code)

CODE

The code the user supplies as having been sent to them

Write the code

Add the following to send-verification-code.sh:

curl GET "https://api.nexmo.com/verify/check/json?api_key=$VONAGE_API_KEY&api_secret=$VONAGE_API_SECRET&request_id=$VERIFY_REQUEST_ID&code=$VERIFY_CODE"

View full source

Run your code

Save this file to your machine and run it:

sh send-verification-code.sh