電子メールを使用して検証リクエストを送信する

を使用する際に、ご自身のメールアドレスを使用したい場合は、以下のようにします。 email チャンネルを'from'フィールドに入力してください。 コンタクトサポート このチャンネルを設定/カスタマイズしたい場合。

を送信することで検証プロセスを開始できます。 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_EMAIL

The email address to send the verification request to.

Write the code

Add the following to send-request-email.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": "email",
         "to": "'$VERIFY_EMAIL_TO'"
      }
   ]
}'

View full source

Run your code

Save this file to your machine and run it:

sh send-request-email.sh

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