Create or regenerate recovery codes
POST/nevisidm/api/core/v1/:clientExtId/users/:userExtId/recovery-codes
Since: 2.78.0
Required permission(s): AccessControl.CredentialCreate,AccessControl.CredentialModify or SelfAdmin Role
Creates a recovery code credential and generates 16 new single-use recovery codes for the user with the given external ID, belonging to the specified client.
If the user already has a recovery code credential, all existing codes are deleted and a fresh set of 16 codes is generated. No request body is required.
Supports self-admin mode with JWT token validation.
Request
Responses
- 201
- 403
- 404
- 422
Recovery codes created successfully
Response Headers
Location
URL of the created resource
Insufficient permissions
Referenced resource not found
Invalid request parameters