サイレント認証を使用して検証リクエストを送信する

を送信することで検証プロセスを開始できます。 Verifyリクエスト を Verify API に送信します。以下の例では サイレント認証 検証のため

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

キー説明
JWT

Used to authenticate your request. See Authentication for more information, including how to generate a JWT.

BRAND_NAME

Included in the message to explain who is confirming the phone number

VONAGE_APPLICATION_PRIVATE_KEY_PATH

Private key path.

VONAGE_APPLICATION_ID

The Vonage Application ID.

TO_NUMBER

The phone number to verify

Write the code

Add the following to send-request-silent-auth.sh:

curl -X POST "https://api.nexmo.com/v2/verify" \
  -H "Authorization: Bearer $JWT"\
  -H 'Content-Type: application/json' \
  -d $'{
	 "brand": "'$VERIFY_BRAND_NAME'",
   "workflow": [
      {
         "channel": "silent_auth",
         "to": "'$VERIFY_NUMBER'"
      }
   ]
}'

View full source

Run your code

Save this file to your machine and run it:

sh send-request-silent-auth.sh

:指定したウェブフックにリクエストがあったことを示すコールバックを受信した場合 blockedによってブロックされている可能性がある。 不正防止システム.