---
title: "Get the extracted OTP"
method: GET
path: "/v1/sms/{id}/otp"
tags: ["sms"]
---

# Get the extracted OTP

`GET /v1/sms/{id}/otp`

## Request

- Base URL: `https://api.mailfixture.com`
- URL: `https://api.mailfixture.com/v1/sms/{id}/otp`
- Auth: HTTP bearer

Byte-identical shape to the email OTP endpoint.

## Path parameters

- `id` string, uuid, required

## Response `200`

Ranked OTP candidates and the best pick.

- ExtractedOtp
  - `best` string, nullable, required: Top-ranked code, or null when no candidate scores above the confidence threshold.
  - `candidates` OtpCandidate[], required: At most 5, sorted by descending score.
    - `score` number, required: Keyword-proximity score, one decimal.
    - `value` string, required: The digit sequence.

## Other responses

- `401`: Missing bearer token, malformed key, or unknown/revoked/invalid API key.
- `404`: No such SMS on this account.
- `429`: Per-key rate limit exceeded. `Retry-After` says when the next request will be admitted; the RateLimit headers name the bucket that refused (`requests` or `creates`) with `r=0`.
- `500`: Unexpected server error. `detail` is null — internals are never leaked.

---

[API](https://skmtc.dev/mailfixture/apis/mailfixture-api.md) · [All operations](https://skmtc.dev/mailfixture/apis/mailfixture-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailfixture/apis/mailfixture-api/revisions/4ddefe29f6f6?raw)
