Skip to navigation

Get a passkey challenge

Issues a single-use challenge for a passkey ceremony. It expires after two minutes and is consumed by the first request that uses it.

  • registration: the challenge for navigator.credentials.create, with a new user_handle to pass as user.id and the rp_id to register under. It needs a token the account signed in with its own key (not a session key, subkey or API token), and only registers a passkey on that account. Request a discoverable credential (residentKey: "required"), user verification, ES256 and attestation none.
  • session: the nonce to put in a SessionMint before signing it with the passkey, and the rp_id to pass to navigator.credentials.get. It needs no token.
ErrorMeaning
PASSKEYS_DISABLEDPasskeys are not enabled for this account (registration).
SESSIONS_DISABLEDSessions are not enabled for this account (registration).

Request

What the challenge is for
purposeenumRequired

registration, to register a passkey (needs the owner’s session, whose account it is for), or session, to sign a SessionMint with one.

Allowed values:

Response

OK
challengestringOptional

The single-use challenge. For registration it is the WebAuthn challenge (base64url); for a session it is the nonce to put in the SessionMint (0x hex).

expires_atintegerOptional
When the challenge expires, in milliseconds.
rp_idstringOptional

The rpId: the one to register the passkey under, or the one to pass to navigator.credentials.get for a session.

user_handlestringOptional

Registration only: the WebAuthn user.id to pass to navigator.credentials.create, base64url. It is random, never the account address.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
503
Service Unavailable Error