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

# auth.keys.expired

> We could not verify this request. Please try again later.

**Code:** `auth.keys.expired`\
**HTTP:** `401 Unauthorized`

## What happened

The API rejected the request during authentication before your route handler ran.

## Safe message

> We could not verify this request. Please try again later.

Use `err.safeMessage` or `err.displayMessage` in customer UI, not `err.message`.

## Why this happened

The API key used for this request has passed its expiration date.

## How to fix it

Create a new key pair in the dashboard and update MORAPAY\_PUBLIC\_KEY / MORAPAY\_SECRET\_KEY.

## UI hint

| Field       | Value      |
| ----------- | ---------- |
| `severity`  | `critical` |
| `placement` | `toast`    |

## Programmatic handling

```typescript theme={null}
import { MorapayAuthenticationError, isMorapayError, MorapayErrorCode } from "@morapay/sdk";

catch (err) {
  if (isMorapayError(err) && err.code === MorapayErrorCode.AuthKeysExpired) {
    console.error(err.format());
    // Customer UI: err.displayMessage ?? err.safeMessage
    // Support: err.requestId
  }
}
```

## Related codes

* [`auth.unauthorized`](/errors/codes/auth-unauthorized)
* [`auth.credentials_missing`](/errors/codes/auth-credentials-missing)
* [`auth.session_invalid`](/errors/codes/auth-session-invalid)
* [`auth.business_context_required`](/errors/codes/auth-business-context-required)
