Skip to content

Generate a replacement Admin UI setup token.

POST
/api/admin/setup-token/generate
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/setup-token/generate \
--header 'Content-Type: application/json' \
--data '{ "admin_user_id": "admin_123", "recovery_key": "recovery_key" }'

Uses the recovery key to revoke pending setup tokens for an admin user and issue a new Admin UI setup token for passkey registration.

Media type application/json
object
admin_user_id
required
string
recovery_key
string
Example
{
"admin_user_id": "admin_123",
"recovery_key": "recovery_key"
}

Successful JSON response.

Media type application/json
object
token
required
string
expires_at
required
integer
admin_user
required
object
id
string
email
string format: email
Example
{
"token": "admin_setup_token_123",
"expires_at": 1770086400000,
"admin_user": {
"id": "admin_123",
"email": "[email protected]"
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}