ReOTP.
API Reference/1. Initialize Verification Process
2 min read

1. Initialize Verification Process

Start a new verification session and wake up the connection server.

The ReOTP system uses an On-Demand Wakeup feature to conserve server resources. This means your WhatsApp connection sleeps, and when you send this request, the server wakes up, opens the connection, and is ready to receive the customer's message.

Request Body:

  • apiKey (string - required): Your project's API key.
  • phoneNumber (string - required): The user's phone number (e.g., +966500000000).
  • method (string - optional): The verification method "WHATSAPP" or "TELEGRAM" (Default: "WHATSAPP").
  • returnUrl (string - optional): The URL the customer will be redirected to after successful verification in the Telegram app.

Response Body:

  • requestId (string): A unique transaction ID to track the verification status.
  • waLink (string): The WhatsApp link (returned only if the method is WHATSAPP).
  • tgLink (string): The Telegram link (returned only if the method is TELEGRAM).
  • expectedText (string): The automated message text that must be sent.
  • expiresIn (string): The expiration time of the request (two minutes).

Important Notes:

  • Validity Period: The customer has only two minutes (02:00) to open the link and send the automated message from their phone before the session expires and the server returns to sleep.
  • User Interface: We highly recommend displaying a countdown timer to the customer in your UI to prompt them to send the message quickly.

Send a POST request to the link shown in the side code panel to start the process.

Integration Code (SDKs)
curl -X POST https://[your-domain.com]/api/verify/init \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "phoneNumber": "+966500000000",
    "method": "WHATSAPP"
  }'
Interactive Playground
Interactive API Test Platform

Enter phone number to initialize the session and test server response instantly:

Interactive Live API Playground

Test verification requests live and generate integration code in your preferred programming language.

curl -X POST https://reotp.com/api/verify/init \
  -H "Authorization: Bearer 15a1c1c7-ed05-40df-b7c3-69c327542a07" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "201000000000",
    "method": "WHATSAPP"
  }'