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
- Your backend calls the
initialize
endpoint of the VerifySpeed API - The API returns a list of available verification methods
- Your backend forwards this list to your mobile/web application
Option B: Direct Client Initialization
- Initialize the VerifySpeed SDK directly using your Client Key
- 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:
-
Your app notifies your backend about the user's chosen verification method
-
Your backend calls the VerifySpeed API's
create
endpoint with the selected method -
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
-
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
- For Message-based methods (WhatsApp/Telegram):
3. Verification Result
After successful verification:
- The SDK returns a verification token to your application
- Your application sends this token to your backend
- Your backend validates the verification by calling the
result
endpoint - The endpoint returns the verified phone number and verification details
Implementation Notes
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
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: