# Get OTP Status
> Source: /api-reference/members/auth/otp-status
> Check SMS delivery status for OTP verification
> Endpoint: POST /members/me/auth/otp-status

## Overview [#overview]

Unauthenticated endpoint for clients to check if their OTP SMS was delivered successfully. The Inngest handler writes status to Redis as it processes SMS delivery events.

This endpoint helps users understand if delivery issues occurred during the OTP verification flow.

## Rate Limiting [#rate-limiting]

- **Rate Limit**: 30 requests per minute per IP address
- **Window**: 60 seconds

## Request Body [#request-body]

<ParamField body="phone" type="string" required>
  Phone number in E.164 format (e.g., "+15551234567")
</ParamField>

<RequestExample>

```bash cURL
curl -X POST "http://localhost:3000/v1/members/me/auth/otp-status" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+15551234567"
  }'
```

```typescript TypeScript
const response = await fetch('http://localhost:3000/v1/members/me/auth/otp-status', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phone: "+15551234567"
  })
});

const status = await response.json();
```

</RequestExample>

## Response [#response]

<ResponseField name="status" type="string" required>
  OTP delivery status
  
  **Possible values:**
  - `"processing"` - OTP send is in progress
  - `"sent"` - OTP was delivered to the provider
  - `"failed"` - Provider rejected the OTP (fraud, invalid number)
  - `"unknown"` - No status found (never requested or expired)
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status description
</ResponseField>

<ResponseExample>

```json 200 Response - Processing
{
  "status": "processing",
  "message": "OTP delivery is in progress"
}
```

```json 200 Response - Sent Successfully
{
  "status": "sent",
  "message": "OTP was successfully delivered"
}
```

```json 200 Response - Failed
{
  "status": "failed",
  "message": "SMS provider rejected the message - please verify phone number"
}
```

```json 200 Response - Unknown
{
  "status": "unknown",
  "message": "No delivery status found for this number"
}
```

```json 429 Response - Rate Limited
{
  "statusCode": 429,
  "message": "Too Many Requests"
}
```

</ResponseExample>

## Status Details [#status-details]

### Processing [#processing]
- **Meaning**: OTP request is still being processed by the SMS provider
- **Action**: Client should wait and retry after a few seconds
- **Duration**: Usually resolves within 10-30 seconds

### Sent [#sent]
- **Meaning**: SMS provider successfully accepted and delivered the message
- **Action**: Member should receive OTP shortly (if not already received)
- **Note**: This doesn't guarantee device delivery, only provider acceptance

### Failed [#failed]
- **Meaning**: SMS provider rejected the message
- **Common causes**:
  - Invalid phone number format
  - Number flagged for fraud/spam
  - Carrier blocking
  - International restrictions
- **Action**: Member should try a different number or contact support

### Unknown [#unknown]
- **Meaning**: No status record found
- **Common causes**:
  - OTP was never requested for this number
  - Status record expired (typically after 1 hour)
  - Number format doesn't match request format
- **Action**: Member should initiate a new OTP request

## Usage Flow [#usage-flow]

1. Member requests OTP via Clerk
2. Client polls this endpoint to check delivery status
3. Based on status, client shows appropriate UI:
   - **Processing**: Show loading state
   - **Sent**: Confirm delivery, proceed to code entry
   - **Failed**: Show error, suggest alternative
   - **Unknown**: Suggest retrying OTP request

## Rate Limiting Details [#rate-limiting-details]

If rate limit is exceeded:
- Returns 429 status code
- Client should implement exponential backoff
- Limit resets after 60 seconds

## Related Endpoints [#related-endpoints]

- [Validate Auth](/api-reference/members/auth/validate) - Provision member after OTP verification
- [Add Verified Contact](/api-reference/members/auth/verified-contact) - Link verified contact
- [Get SMS Countries](/api-reference/members/auth/accepted-sms-countries) - Check supported countries
