> ## Documentation Index
> Fetch the complete documentation index at: https://docs.otpedge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify OTP

> Validates the user OTP and returns an Identity Token.

## Request Body

<ParamField body="phone_number" type="string" required>
  The recipient's phone number in E.164 format.
</ParamField>

<ParamField body="code" type="string" required>
  The 6-digit code entered by the user.
</ParamField>

### Response Examples

<ResponseExample>
  ```json 200 OK (Valid) theme={null}
  {
    "status": "verified",
    "identity_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InZub2RlXzIwMjZfMDUifQ..."
  }
  ```

  ```json 401 Unauthorized (Invalid) theme={null}
  {
    "error": "Invalid or expired OTP"
  }
  ```
</ResponseExample>

<Note>
  **The response does not contain user data.** You must decode the `identity_token` on your backend to retrieve the user's phone number. This ensures the request is authentic and hasn't been tampered with.
</Note>
