Skip to main content

Account recovery v1 API (deprecated)

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/api/users/v1

The User Account Recovery API (version v1).

Download the OpenAPI definition (YAML)

Username Recovery​

Initiate Username Recovery​

POST /recovery/username/init

  • This API is used to initiate username recovery by user. The API will return available recovery information for username recovery with notifications.

  • Use the returned recoveryCode and the channelId with username recover api to confirm the username recovery and to receive recovery notifications via the channel specified by the user.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

Request to initiate username recovery process. The request should contain the claims to identify the user. User claims are REQUIRED.

Schema: InitRequest

2 properties
NameTypeRequiredDescription
claimsarray of UserClaimYes

User claims to identify the user as UserClaim objects

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200

User is successfully identified for the given claims and returning available notification channels for the user.

array of AccountRecoveryType
400

Bad Request. The request cannot be processed by the server.

ErrorResponse
403

Username recovery is not enabled.

ErrorResponse
404

No user found for the given set of claims or no recovery channels are available for the user.

ErrorResponse
409

Multiple users found for the given claims.

ErrorResponse
500

Server Error.

ErrorResponse

Get Recovery Information​

POST /recovery/username/recover

  • This API is used to confirm username recovery and send username recovery information to the user who matches the recovery code via the channel specified by the channel Id.
  • NOTE: If the notification channel is EXTERNAL, the API will return the username of the user.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

  • Request to confirm username recovery and receive recovery notifications.
  • recoveryCode and channelId are REQUIRED.
  • NOTE channelId should always be larger than 0.

Schema: RecoveryRequest

3 properties
NameTypeRequiredDescription
recoveryCodestringYes

Recovery code for the user

channelIdstringYes

Id of the notification channel that user prefers to get recovery notifications.

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200

Username is successfully recovered and the notification channel is EXTERNAL.

UsernameRecoveryNotifyResponse
202

Username is successfully recovered.

UsernameRecoveryNotifyResponse
400

Bad Request. Request cannot be processed by the server.

ErrorResponse
404

Recovery code is not found.

ErrorResponse
406
  • Recovery code given in the request is not valid or expired.
  • Channel id is not valid
ErrorResponse
500

Server Error.

ErrorResponse

Password Recovery​

Initiate password recovery​

POST /recovery/password/init

  • This API is used to initiate password recovery by user. The API will return recovery information for password recovery with challenge questions and password recovery with notifications.

  • mode recoverWithNotifications contains available communication channels and a recovery code for password recovery with notifications. The next API call will be returned in the response.

  • If password recovery with notifications is not enabled, the response will not contain recoverWithNotifications mode.

  • recoverWithChallengeQuestions contains the next API call to begin the recovery process via challenge questions.

  • If password recovery with challenge questions is not enabled, the response will not contain recoverWithChallengeQuestions mode.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

Request to initiate password recovery process. The request should contain the claims to identify the user. User claims are REQUIRED.

Schema: InitRequest

2 properties
NameTypeRequiredDescription
claimsarray of UserClaimYes

User claims to identify the user as UserClaim objects

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200

User is successfully identified for the given claims and returning available notification channels for the user.

array of AccountRecoveryType
400

Bad Request. The request cannot be processed by the server.

ErrorResponse
404

No user found for the given set of claims or no recovery channels are available for the user.

ErrorResponse
409

Multiple users found for the given claims.

ErrorResponse
500

Server Error.

ErrorResponse

Get Recovery Information​

POST /recovery/password/recover

  • This API is used to send recovery information to the user who matches the recovery code via the channel specified by the channel Id.

  • NOTE: If the notification channel is EXTERNAL, the API will return a confirmationCode.

  • Use the returned confimation code with password recovery confirm API to verify the password recovery process.

  • The API will return the next API call.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

  • Request to receive recovery notifications.
  • recoveryCode and channelId are REQUIRED.
  • NOTE channelId should always be larger than 0.

Schema: RecoveryRequest

3 properties
NameTypeRequiredDescription
recoveryCodestringYes

Recovery code for the user

channelIdstringYes

Id of the notification channel that user prefers to get recovery notifications.

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200
  • Password recovery initiated via EXTERNAL channel. API will return a confirmationCode to confirm password recovery.
  • Use the confirmation code with password recovery confirm API to confirm the password recovery.
PasswordRecoveryExternalNotifyResponse
202
  • Password recovery initiated via internal channels. API will send a confirmationCode to the channel specified by the user.
  • Use the confirmation code with password recovery confirm API to confirm the password recovery.
PasswordRecoveryInternalNotifyResponse
400

Bad Request. Request cannot be processed by the server.

ErrorResponse
403

Password recovery is not enabled.

ErrorResponse
404

Recovery code is not found.

ErrorResponse
406
  • Recovery code given in the request is not valid or expired.
  • Channel id is not valid
ErrorResponse
500

Server Error.

ErrorResponse

Resend password recovery confirmation details​

POST /recovery/password/resend

  • This API is used to resend a confirmation code to the user via a user preferred channel defined at password recovery.

  • NOTE: The API cannot be used when the notification channel is external.

  • The API will return the next API calls.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

  • Request to resend the confirmationCode to the user via a user preferred channel.
  • Can send additional properties.

Schema: ResendConfirmationRequest

2 properties
NameTypeRequiredDescription
resendCodestring

Resend code returned by the password recovery API

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200
  • API will return a new confirmationCode.
  • Use the confirmation code with password recovery confirm API to confirm the password recovery.
ResendConfirmationCodeExternalResponse
202
  • API will send a confirmationCode to the channel specified by the user.
  • Use the confirmation code with password recovery confirm API to confirm the password recovery.
ResendConfirmationCodeInternalResponse
400

Bad Request. Request cannot be processed by the server.

ErrorResponse
404

Resend code is not found.

ErrorResponse
406

Resend code given in the request is not valid or expired.

ErrorResponse
500

Server Error.

ErrorResponse

Confirm password recovery​

POST /recovery/password/confirm

  • This API is used to validate the confirmationCode given at password recovery.

  • Use the returned reset code with the password reset API to reset the password.

  • The API will return the next API call.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

  • Request to confirm the password recovery.
  • confirmationCode is REQUIRED.

Schema: ConfirmRequest

2 properties
NameTypeRequiredDescription
confirmationCodestring

Confirmation code given to the user

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200
  • Password reset confirmed.
  • resetCode is returned.
ResetCodeResponse
400

Bad Request. Request cannot be processed by the server.

ErrorResponse
404

Confirmation code is not found.

ErrorResponse
406

Confirmation code given in the request is not valid or expired.

ErrorResponse
500

Server Error.

ErrorResponse

Reset password​

POST /recovery/password/reset

This API is used to reset the password of the user who matches the resetCode given by the confirmation API.

Scope(Permission) required: internal_user_recovery_create

Request body (required): application/json

  • Request to reset the password.
  • resetCode and password are required.

Schema: ResetRequest

3 properties
NameTypeRequiredDescription
resetCodestring

resetCode given by the confirm API

passwordstring

New password given by the user

propertiesarray of Property

(OPTIONAL) Additional META properties

Responses

CodeDescriptionSchema
200

Successful password reset.

PasswordResetResponse
400

Bad Request. Request cannot be processed by the server.

ErrorResponse
404

Reset code is not found.

ErrorResponse
406

Reset code given in the request is not valid or expired.

ErrorResponse
412

Password policy violation.

RetryErrorResponse
500

Server Error.

ErrorResponse

Schemas​

InitRequest​

Type: object

Request to initiate an account recovery

2 properties
NameTypeRequiredDescription
claimsarray of UserClaimYes

User claims to identify the user as UserClaim objects

propertiesarray of Property

(OPTIONAL) Additional META properties

RecoveryRequest​

Type: object

Request to start the recovery for the user who matches the recovery code via the given channelID

3 properties
NameTypeRequiredDescription
recoveryCodestringYes

Recovery code for the user

channelIdstringYes

Id of the notification channel that user prefers to get recovery notifications.

propertiesarray of Property

(OPTIONAL) Additional META properties

ResendConfirmationRequest​

Type: object

Request to resend the confirmation code in password recovery

2 properties
NameTypeRequiredDescription
resendCodestring

Resend code returned by the password recovery API

propertiesarray of Property

(OPTIONAL) Additional META properties

ConfirmRequest​

Type: object

Request to confirm password recovery

2 properties
NameTypeRequiredDescription
confirmationCodestring

Confirmation code given to the user

propertiesarray of Property

(OPTIONAL) Additional META properties

ResetRequest​

Type: object

Object to reset the password of a user

3 properties
NameTypeRequiredDescription
resetCodestring

resetCode given by the confirm API

passwordstring

New password given by the user

propertiesarray of Property

(OPTIONAL) Additional META properties

PasswordRecoveryInternalNotifyResponse​

Type: object

5 properties
NameTypeRequiredDescription
codestring

Success status code

messagestring

Success status message

notificationChannelstring

Channel that is used to send recovery information

resendCodestring

Code to resend the confirmation code to the user via user selected channel

linksarray of APICall

Contains available api calls

PasswordRecoveryExternalNotifyResponse​

Type: object

6 properties
NameTypeRequiredDescription
codestring

Success status code

messagestring

Success status message

notificationChannelstring

Channel that is used to send recovery information

confirmationCodestring
  • Confirmation code for password recovery when the notifications are externally managed.
  • The confirmation code will be returned only if the notification channel is EXTERNAL. Use this code with password confirm API to get a password reset code.
resendCodestring

Code to get a new confirmation code.

linksarray of APICall

Contains available api calls

UsernameRecoveryNotifyResponse​

Type: object

API response for successful username recovery

4 properties
NameTypeRequiredDescription
codestringYes

Success status code

messagestringYes

Success status message

notificationChannelstringYes

Channel which the recovery information is sent to the user

usernamestringYes
  • Username of the user
  • Username will be returned ONLY IF the notification channel is EXTERNAL

ResetCodeResponse​

Type: object

2 properties
NameTypeRequiredDescription
resetCodestring

Password reset code to reset the password

linksarray of APICall

Contains available api calls

PasswordResetResponse​

Type: object

API response for a successful password reset

2 properties
NameTypeRequiredDescription
codestring

Operation code

messagestring

Message regarding the operation.

ResendConfirmationCodeExternalResponse​

Type: object

Object encapsulate the details regarding resend confirmation code

6 properties
NameTypeRequiredDescription
codestring

Success status code

messagestring

Success status message

notificationChannelstring

Channel that is used to send recovery information

confirmationCodestring

Confirmation code to confirm the password recovery

resendCodestring

Resend code to resend the confirmation code

linksarray of APICall

Contains available api calls

ResendConfirmationCodeInternalResponse​

Type: object

Object encapsulate the details regarding resend confirmation code

5 properties
NameTypeRequiredDescription
codestring

Success status code

messagestring

Success status message

notificationChannelstring

Channel that is used to send recovery information

resendCodestring

Resend code to resend the confirmation code

linksarray of APICall

Contains available api calls

RetryErrorResponse​

Type: object

6 properties
NameTypeRequiredDescription
codestring

Error code corresponding to the error

messagestring

Error message

descriptionstring

Error description

traceIdstring

Some Correlation for Error Instance

resetCodestring

Password reset code used in the request

linksarray of APICall

Contains available api calls

ErrorResponse​

Type: object

4 properties
NameTypeRequiredDescription
codestring

Error code corresponding to the error

messagestring

Error message

descriptionstring

Description about the error

traceIdstring

Some Correlation for Error Instance

AccountRecoveryType​

Type: object

Object that encapsulates details of the account recovery channel

3 properties
NameTypeRequiredDescription
modestring
channelInfoRecoveryChannelInformation

Response with the recovery ID and the available recovery channels

linksarray of APICall

Contains available api calls

RecoveryChannelInformation​

Type: object

Response with the recovery ID and the available recovery channels

2 properties
NameTypeRequiredDescription
recoveryCodestring

Code to recovery the user account

channelsarray of RecoveryChannel

Available recovery channels for the user

RecoveryChannel​

Type: object

Object with notification channel attributes

4 properties
NameTypeRequiredDescription
idstring

Id given to the channel

typestring

Type of the chanel

valuestring

Masked channel value

preferredboolean

Whether the channel is a user preferred channel

UserClaim​

Type: object

Object that holds a user claim and the corresponding value

2 properties
NameTypeRequiredDescription
uristring

Claim uri

valuestring

Value for the claim

Property​

Type: object

object that holds a property as a key, value pair

2 properties
NameTypeRequiredDescription
keystring

Unique identifier as the key of the property

valuestring

Value of the property

APICall​

Type: object

Object that holds next API call details

3 properties
NameTypeRequiredDescription
relstring

Next API call

hrefstring

Next API url

typestring

HTTP method type

Was this page helpful?