---
title: "Verify OTP"
method: POST
path: "/verify_otp"
---

# Verify OTP

`POST /verify_otp`

## Request

- Base URL: `https://api.myotp.app`
- URL: `https://api.myotp.app/verify_otp`
- Auth: none declared. Required headers: `X-API-Key`

Validate the OTP for successful verification

## Headers

- `X-API-Key` string, required

## Request body

- object
  - `phone_number` string: Phone number to verify the OTP
  - `message_id` string: ID of the message to verify. When supplied, the check is scoped to that one challenge: a code from any other message to the same number does not verify. Supply it whenever you have it. Without it, the most recent active code for phone_number is checked.
  - `otp` string, required: OTP to verify

## Response `200`

OTP verification result

- object
  - `status` 'success' | 'failed': Status of the OTP verification
  - `reason` 'invalid' | 'expired' | 'not found': Present when status is failed. An expired code answers status failed with reason expired. A code accepts five wrong attempts: the fifth answers invalid and deletes the code, and later attempts fail until a new code is sent.
  - `message` string: Message describing the status of the OTP verification

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: "User is not active" when the subscription is paused, or the calling IP is not on your account's allowlist. Never refused for balance: codes already sent verify at zero balance.
- `429`: Too many requests from this IP address. The edge allows 100 requests a minute per client IP with a burst of 100, counted across every endpoint together, so sends and status checks share one budget. Accounts that ask for more are raised to 500 a minute; X-RateLimit-Limit on every response tells you which ceiling applies to you. Wait the number of seconds in Retry-After and repeat the request. Write to support@myotp.app with the addresses you call from and the peak you are designing for if you need a higher limit.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/myotp/apis/myotpapp-api.md) · [All operations](https://skmtc.dev/myotp/apis/myotpapp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myotp/apis/myotpapp-api/revisions/95ed911fdece?raw)
