API Reference/1. Pre-fetch Links in Background (Zero-Delay)
1 min read
1. Pre-fetch Links in Background (Zero-Delay)
Secretly pre-fetch verification links with zero delay before the user clicks login.
ReOTP is designed to deliver a "Zero-Type Auth" experience. Simply request the verification links and we will magically capture the user's phone number directly from their message!
Request Body Parameters:
apiKey(string - Required): Your project's API Key.
phoneNumber(string - Optional): The user's phone number. If omitted, we will automatically capture it from the sender.
method(string - Required): Must be"WHATSAPP"or"TELEGRAM".
returnUrl(string - Optional): Redirect URL for Telegram bot completion.
Response Body Parameters:
requestId(string): Unique identifier for the verification session.
- UI Best Practices: We highly recommend displaying a countdown timer in your UI to guide the user to complete the verification before it times out.
Send a POST request to the endpoint shown in the code panel to initialize the session.
Integration Code (SDKs)
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"
}'