Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

Recover WebAuthn account

Recover a WebAuthn account

POST/{apiBasePath}/{tenantId}/webauthn/recover/account
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
tokenstringrequired
webauthnGeneratedOptionsIdstringrequired
credentialregistrationPayloadrequired
WebAuthn registration payload
Show properties
idstringrequired
Credential ID
rawIdstringrequired
Raw credential ID
authenticatorAttachmentstring
Type of authenticator
Allowed:platformcross-platform
clientExtensionResultsobject
Client extension results
responseobjectrequired
Registration response
Show properties
clientDataJSONstringrequired
Client data JSON
attestationObjectstringrequired
Attestation object
authenticatorDatastring
Authenticator data
transportsstring[]
Supported transports
publicKeystring
Public key
publicKeyAlgorithmnumber
Public key algorithm
typestringrequired
Credential type
Allowed:public-key
Responses
200Account recovery response
One of:
object
statusstatusOK
Success status indicator
Allowed:OK
useruser
User information
Show properties
iduserId
Unique identifier for a user
timeJoinednumber
Timestamp when user joined
isPrimaryUserboolean
Whether this is the primary user account
tenantIdsstring[]
List of tenant IDs the user belongs to
emailsstring[]
List of user's email addresses
phoneNumbersstring[]
List of user's phone numbers
thirdPartyobject[]
List of third party accounts
Show properties
Array of object
idstring
Third party provider ID
userIdstring
User ID in the third party system
loginMethodsobject[]
List of login methods available to the user
Show properties
Array of object
recipeIdstring
The recipe ID for this login method
Allowed:emailpasswordthirdpartypasswordless
recipeUserIduserId
Unique identifier for a user
verifiedboolean
Whether this login method is verified
tenantIdsstring[]
List of tenant IDs for this login method
timeJoinednumber
Timestamp when this login method was added
emailstring
Email address for this login method
phoneNumberstring
Phone number for this login method
thirdPartyobject
Third party information for this login method
Show properties
idstring
Third party provider ID
userIdstring
User ID in the third party system
emailemail
Email address
generalErrorResponse
statusstring
Error status code
Allowed:GENERAL_ERROR
messagestring
Error message
object
statusstring
Allowed:INVALID_CREDENTIALS_ERRORRECOVER_ACCOUNT_TOKEN_INVALID_ERROROPTIONS_NOT_FOUND_ERRORINVALID_OPTIONS_ERROR
object
statusstring
Allowed:INVALID_AUTHENTICATOR_ERROR
reasonstring
404Resource not found error
string
500Internal server error
string
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/webauthn/recover/account" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "abc123...",
  "webauthnGeneratedOptionsId": "opt_123...",
  "credential": {
    "id": "cred_123...",
    "rawId": "base64rawid...",
    "authenticatorAttachment": "platform",
    "clientExtensionResults": {},
    "response": {
      "clientDataJSON": "base64clientdata...",
      "attestationObject": "base64attestation...",
      "authenticatorData": "base64authenticatordata...",
      "transports": [
        "usb"
      ],
      "publicKey": "base64publickey...",
      "publicKeyAlgorithm": -7
    },
    "type": "public-key"
  }
}'
Response
{
  "status": "OK",
  "user": {
    "id": "fa7a0841-b533-4478-95533-0fde890c3483",
    "timeJoined": 1638433545183,
    "isPrimaryUser": true,
    "tenantIds": [
      "public"
    ],
    "emails": [
      "[email protected]"
    ],
    "phoneNumbers": [
      36201234123
    ],
    "thirdParty": [
      {
        "id": "google",
        "userId": "rq238mrq2389rvq123213"
      }
    ],
    "loginMethods": [
      {
        "recipeId": "emailpassword",
        "recipeUserId": "fa7a0841-b533-4478-95533-0fde890c3483",
        "verified": true,
        "tenantIds": [
          "public"
        ],
        "timeJoined": 1638433545183,
        "email": "[email protected]",
        "phoneNumber": 36201234123,
        "thirdParty": {
          "id": "google",
          "userId": "rq238mrq2389rvq123213"
        }
      }
    ]
  },
  "email": "[email protected]"
}

API reference

API schema and response details