Cloud Administration Void Password Reset Code API
8 months ago

Cloud Administration Void Password Reset Code API

Use the Cloud Administration Void Password Reset Code API to void reset codes for a set of users. This API returns a list of users for whom the voiding process succeeded or failed.

For information about managing access to this API, see Accessing the Cloud Administration APIs.

Authentication

Clients calling this API must authenticate themselves by including a JSON Web Token in a request. For instructions on using this token, see Authentication for the Cloud Administration APIs.

Software Developer Kit

You can download the API Software Developer Kit (SDK) from Cloud Administration REST API Download.

Request Requirements

Use the following information to void a password reset code for a user.

ActionMethodRequest URLResponse Content TypeResponse BodyResponse Codes
Void Verify Code for password reset POST
AdminInterface/restapi/v1/users/voidVerifyCode

application/json
json 1002, 1015, 1016

Example Request Data

The following example displays a request.

POST /AdminInterface/restapi/v1/users/voidVerifyCode

Accept: application/json

Authorization: Bearer <JWT token>

Request Body Parameters

The following table describes the request body parameters.

Request ParameterDescriptionRequired?Data Type
userEmailsA list of user emails. YesList<String>
codeGenerationMode The mode that these codes were generated for. Must be set to "PASSWORD_RESET" for password reset code. YesString

Example Request Body

The following is an example request body.

{
    "code_generation_mode": "PASSWORD_RESET",
    "user_emails": [
        "user1@example.com"
    ]
}

Response Body Parameters

The following table describes the request body parameters:

Request ParameterDescriptionData Type
results

A list of results. Each result is an object made up of:

  • status

  • user_email

  • errorMessage (provided only if the result is anything other than success)

List<Result> - each result is made up of:

  • int

  • String

  • String

Example Response Body

The following example response shows the results when voiding password reset codes for a list of users.

{
    "results": [{
            "status": 1015,
            "errorMessage": "No password reset code found to void. Password reset code may have expired or has been used already.",
            "user_email": "user1@example.com"
        }, {
            "status": 1016,
            "user_email": "user2@example.com"
        }
    ]
}

Response Codes

The following table shows response codes and descriptions for this API.

CodeDescription
400Bad request. Caused by the following: Number of users exceeds maximum allowed value of 100. { "code": "400 BAD_REQUEST", "description": "Number of user details (178) in request exceeds maximum allowed (100)" }
429Too many requests.
1002

User is not found /valid for the following reasons:

  • User is present in Identity Sources but not synced with Cloud Access Service (CAS).

  • User is not present in Identity Sources.

1015Error during password reset code void operation. Either the code has already been used, expired, previously voided, or does not exist, or other internal error.
1016Successful void of the password reset code.