ReOTP.
API/2. ตรวจสอบสถานะการยืนยัน
1 นาทีในการอ่าน

2. ตรวจสอบสถานะการยืนยัน

สอบถามสถานะของเซสชันการยืนยันปัจจุบัน

Once the verification process is initialized and you get a requestId, your frontend needs to check (Poll) the endpoint periodically to know if the user has sent the message.

Polling Mechanism:

  • Make a GET request to the status endpoint every 3 seconds.
  • Once you receive the "VERIFIED" status, stop polling and log the user in.

Returned Session Statuses:

  • PENDING: The user has not sent the verification message yet. Continue polling.
  • VERIFIED: The message was received, and the number is verified.
  • EXPIRED: The session has timed out (usually 2 minutes after initiation).
โค้ดสำหรับการเชื่อมต่อ (SDKs)
curl -N https://reotp.com/api/verify/stream?id=YOUR_REQUEST_ID

ทดสอบ API แบบโต้ตอบโดยตรง (Interactive API Playground)

ลองส่งคำขอยืนยันโดยตรงและสร้างโค้ด Integration ด้วยภาษาโปรแกรมที่คุณต้องการ

curl -X POST https://reotp.com/api/verify/init \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "201000000000",
    "method": "WHATSAPP"
  }'