Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

Get WebAuthn registration options

Get WebAuthn registration options for a user

POST/{apiBasePath}/{tenantId}/webauthn/register/options
Path parameters
apiBasePathstringrequired
Its value depends on the apiBasePath set by the user
tenantIdstring
The tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstring
The WebAuthn recipe ID
Request body
application/json
One of:
object
emailemailrequired
Email address
displayNamestring
object
recoverAccountTokenstringrequired
Responses
200WebAuthn registration options
One of:
object
statusstatusOK
Success status indicator
Allowed:OK
webauthnGeneratedOptionsIdstring
createdAtstring
expiresAtstring
rpobject
Show properties
idstring
namestring
userobject
Show properties
idstring
namestring
displayNamestring
challengestring
timeoutnumber
excludeCredentialsobject[]
Show properties
Array of object
idstring
typestring
Allowed:public-key
transportsstring[]
attestationstring
Allowed:noneindirectdirectenterprise
pubKeyCredParamsobject[]
Show properties
Array of object
algnumber
typestring
authenticatorSelectionobject
Show properties
requireResidentKeyboolean
residentKeystring
Allowed:requiredpreferreddiscouraged
userVerificationstring
Allowed:requiredpreferreddiscouraged
generalErrorResponse
statusstring
Error status code
Allowed:GENERAL_ERROR
messagestring
Error message
object
statusstring
Allowed:INVALID_OPTIONS_ERRORRECOVER_ACCOUNT_TOKEN_INVALID_ERROR
object
statusstring
Allowed:INVALID_EMAIL_ERROR
errstring
404Resource not found error
string
500Internal server error
string
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/webauthn/register/options" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "johndoe@gmail.com",
  "displayName": "John Doe"
}'
Response
{
  "status": "OK",
  "webauthnGeneratedOptionsId": "opt_123...",
  "createdAt": "2024-03-20T10:00:00Z",
  "expiresAt": "2024-03-20T10:05:00Z",
  "rp": {
    "id": "example.com",
    "name": "Example Site"
  },
  "user": {
    "id": "user_123...",
    "name": "john@example.com",
    "displayName": "John Doe"
  },
  "challenge": "base64challenge...",
  "timeout": 300000,
  "excludeCredentials": [
    {
      "id": "string",
      "type": "public-key",
      "transports": [
        "ble"
      ]
    }
  ],
  "attestation": "none",
  "pubKeyCredParams": [
    {
      "alg": -7,
      "type": "public-key"
    }
  ],
  "authenticatorSelection": {
    "requireResidentKey": true,
    "residentKey": "required",
    "userVerification": "required"
  }
}

API reference

API schema and response details