PUT/v2/user/mfa/recovery

Regenerate multi-factor authentication recovery codes

Regenerates the authenticated user's multi-factor authentication recovery codes. Supply the account password to authorize the change. The response contains the newly generated codes.

1 body field

The account password used to authorize regeneration of recovery codes.

passwordstringrequired
The account password. Must be no more than 50 characters.

5 status codes
200Returns an array of newly generated recovery-code strings.
400Returned when `password` is missing or the request is invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the password or authentication is rejected.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to regenerate codes.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the associated user or resource cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when password is missing or the request is invalid. A 401 is returned when the password or authentication is rejected, a 403 when the authenticated user is not permitted to regenerate codes, and a 404 when the associated user or resource cannot be found. password can contain up to 50 characters.