Documentation
GET /otp/{otp_id}
Fetch the current state of a verification at any time, one of pending, approved, failed, or expired.
Fetch the current state of an OTP at any time. status is one of pending,
approved, failed, or expired.
Use it to check progress at any time. Approval normally comes from the
POST /otp/verify response or the
otp.approved webhook; this endpoint is the pull alternative.
curl https://api.otp.com/api/v1/otp/9f3c1b2a-… \
-H "Authorization: Bearer otp_live_•••"
Path parameter
| Parameter | Description |
|---|---|
otp_id |
The id returned by send. |
Response
{
"otp_id": "9f3c1b2a-…",
"status": "pending",
"masked_recipient": "+1****71"
}
| Status | Meaning |
|---|---|
pending |
Waiting for the user to enter a correct code. |
approved |
Verified: a correct code was entered. |
failed |
Attempts were exhausted without a correct code. |
expired |
The code timed out before it was verified. |
Common errors
| Status | Type | When |
|---|---|---|
404 |
HTTPException |
otp_id not found, or not on your company. |
See Error codes for the full list.