Skip to main content
Version: 1.0

1.1 Verification Flow

Verification Flow

The verification flow is designed to ensure secure and reliable phone number verification. It consists of three main phases:

1. Initialization

To begin the verification process, you can initialize either through your backend or directly from your client application:

Option A: Backend Initialization

  1. Your backend calls the initialize endpoint of the VerifySpeed API
  2. The API returns a list of available verification methods
  3. Your backend forwards this list to your mobile/web application

Option B: Direct Client Initialization

  1. Initialize the VerifySpeed SDK directly using your Client Key
  2. The SDK automatically fetches available verification methods

After initialization through either method, the user selects their preferred verification method (WhatsApp Message, WhatsApp OTP, Telegram Message, etc.)

2. Create Verification

Once a method is selected:

  1. Your app notifies your backend about the user's chosen verification method

  2. Your backend calls the VerifySpeed API's create endpoint with the selected method

  3. The API returns a verification key and:

    • For Message-based methods: A deep link for the messaging app
    • For OTP-based methods: No additional data
  4. The verification continues based on the method:

    • For Message-based methods (WhatsApp/Telegram):
      • User is redirected to the messaging app via the deep link
      • User completes verification in the messaging app
      • User returns to your app (via deep link or by manually switching apps)
    • For OTP-based methods:
      • User enters their phone number in your app
      • SDK uses the verification key to request an OTP code
      • VerifySpeed sends the code via the chosen method (WhatsApp/Telegram/SMS)
      • User enters the received code in your app

3. Verification Result

After successful verification:

  1. The SDK returns a verification token to your application
  2. Your application sends this token to your backend
  3. Your backend validates the verification by calling the result endpoint
  4. The endpoint returns the verified phone number and verification details

Implementation Notes

Deep Linking Behavior

For Message-based verifications (WhatsApp Message and Telegram Message):

  • Mobile Devices: Automatic redirection to the messaging app
  • Web/Desktop/POS: QR code display for mobile device scanning
Verification Token Usage

The verification token is essential for:

  • User sign-up processes
  • Login verification
  • Phone number changes
  • Any other operations requiring verified phone numbers

Typical Verification Flow

Below is an example of a WhatsApp Message verification flow:

Verification Flow Diagram