Verify API
Verify API を使用すると、特定の番号でユーザーに連絡できることを確認できるため、次のことができます。
- 自分の電話番号が正しいことが保証されるため、いつでもユーザーにリーチできます
- 1 人のユーザーが複数のアカウントを作成できないため、詐欺やスパムから保護されます
- ユーザーが特定のアクティビティを実行するときにユーザーの身元を確認できるように、セキュリティレイヤーを追加できます
仕組み
確認は 2 段階のプロセスで、次の 2 つの API 呼び出しが必要です。
確認リクエスト

ユーザーは、アプリまたは Web サイト経由でサービスに登録し、電話番号を提供します。
ユーザーが登録した番号にアクセスできることを確認するために、アプリケーションは確認リクエストのエンドポイントへの API 呼び出しを行います。
Verify API は、関連付けられた
request_idを使用して PIN コードを生成します。場合によっては、独自の PIN コードも入力できますので、アカウントマネージャーにお問い合わせください。
次に、Verify API は、この PIN のユーザーへの配信を試みます。これらの試行の形式 (SMS またはテキスト読み上げ (TTS)) とタイミングは、選択したワークフローによって定義されます。ユーザーが受け取った PIN を入力するためにアプリまたは Web サイトに再度アクセスしなかった場合、確認リクエストは最終的にタイムアウトになります。それ以外の場合は、[確認] チェックを実行して、入力された番号を確認する必要があります。
確認チェック

5 . ユーザーは PIN を受け取り、アプリケーションに入力します。
6 .アプリケーションは、確認チェックのエンドポイント に API 呼び出しを行い、ユーザーが入力した request_id と PIN を渡します。
7 . Verify API は、入力された PIN が送信された PIN と一致することを確認し、結果をアプリケーションに返します。
最初のステップ
次のサンプルは、ユーザーに確認コードを送信して確認プロセスを開始する方法を示しています。ユーザーが入力したコードを確認したり、その他の操作を実行したりする方法については、コードスニペットを参照してください。
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named request.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 StartVerification and add the following code to the main method:
Run your code
We can use the application 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.kt.verify.legacy with the package containing StartVerification:
Prerequisites
Add the following to build.gradle:
Create a class named StartVerification and add the following code to the main method:
Run your code
We can use the application 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.verify with the package containing StartVerification:
Prerequisites
Create a file named SendVerificationRequest.cs and add the following code:
Add the following to SendVerificationRequest.cs:
Prerequisites
Create a file named request.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 request.rb and add the following code:
Run your code
Save this file to your machine and run it:
ガイド
- Overview: Learn more about working with the Verify API.
- Verify Migration Guide: This guide will help you migrate from Verify Legacy to Verify.
- Verify Languages: The available languages for V2 of the Verify API
- Template Management: How to use template management to send custom OTP messages with the Vonage Verify API
- Verify API Webhooks: A guide to webhooks and how they can be used with the Verify API.
- Verify Anti-Fraud System: Verify's anti-fraud system
- Network Unblock API: Learn what the Vonage Network Unblock API is and how to use it.
- Silent Authentication: Using Silent Authentication with the Vonage Verify API
- Silent Authentication Territories: A list of the currently available territories for Silent Authentication.
- Using the Silent Authentication Sandbox: How to configure and use the silent authentication sandbox.
コードスニペット
- Before you begin
- Cancel a verification request
- Check a verification code
- Create a Template
- Create a Template Fragment
- Delete a Template
- Delete a Template Fragment
- Get a Template
- Get a Template Fragment
- List Template Fragments
- List Templates
- Send verification request (with fallback option)
- Send verification request using Email
- Send verification request using Silent Authentication
- Send verification request using SMS
- Send verification request using Voice (TTS)
- Send verification request using WhatsApp
- Update a Template
- Update a Template Fragment