ZITADEL Docs
APIsCore ResourcesV2User

Generate single-use recovery codes for a user

Generate new single-use recovery codes for the authenticated user. Recovery codes can be used to recover access to the account if other second factors are not available.

POST
/v2/users/{user_id}/recovery_codes

Path Parameters

user_id*string

Request Body

application/json

count?integer
Formatint32
[key: string]?never

Response Body

application/json

curl -X POST "https://loading/v2/users/string/recovery_codes" \  -H "Content-Type: application/json" \  -d '{}'
{
  "details": {
    "sequence": 0,
    "changeDate": "2023-01-15T01:30:15.01Z",
    "resourceOwner": "string",
    "creationDate": "2023-01-15T01:30:15.01Z"
  },
  "recoveryCodes": [
    "string"
  ]
}

Was this page helpful?