# Start a passkey step-up

> Source: https://truto.one/docs/api-reference/admin/passkeys/step-up-options/

`POST /auth/passkey/step-up/options`

Resource: **Passkeys**

Issues the `PublicKeyCredentialRequestOptionsJSON` for answering a step-up prompt (`step_up_factors` includes `passkey`) with `navigator.credentials.get()`. Unlike sign-in, `allowCredentials` names the signed-in user's passkeys, and `userVerification` is `required`.

The challenge is stored server-side against the user for 5 minutes and is single-use: it is spent when a `passkey` proof carrying it is checked, whatever the verdict. A new call replaces it. Retry the gated request with the assertion as its `passkey` field. The credential must belong to the signed-in user.

At most ten calls per minute per user; beyond that the call answers 429 with a `Retry-After` header in seconds.

**Session only.** An API token or tenant token is rejected with 403, and so is a session that is impersonating another user.

## Response body

- **`options`** _(object, required)_
  A bare `PublicKeyCredentialRequestOptionsJSON` — pass it straight to `navigator.credentials.get({ publicKey })`. Note `rpId` is flat here, unlike the nested `rp` object on registration options.
  - **`rpId`** _(string)_
    The environment's `APP_URL` host.
  - **`challenge`** _(string)_
    base64url challenge. Single-use, stored server-side for 5 minutes under `handle`.
  - **`allowCredentials`** _(array<object>)_
    Always empty — sign-in is usernameless, so the browser offers whichever discoverable credential it holds for this `rpId`. Naming credentials here would leak which accounts exist.
  - **`timeout`** _(number)_
  - **`userVerification`** _(string)_
    Allowed: `required`

## Errors

| Status | Description |
| :----- | :---------- |
| `400` | The account is not asked for a passkey (it has none, or its organization enforces SSO). |
| `401` | Not signed in. |
| `403` | Not a browser session, or the session is impersonating. |
| `404` | Passkeys are not enabled for this environment. |
| `429` | Ten options calls in the last minute. |

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/auth/passkey/step-up/options' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/auth/passkey/step-up/options', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/auth/passkey/step-up/options"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.post(url, headers=headers, params=params)
print(response.json())
```
