Get Password Token


Get the token for resetting the password of a user.

Prerequisites


The application has been granted the permission “Create or delete user accounts in the OU”. Contact the OU administrator to get the permission if necessary.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/password/getResetToken

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

OU ID. How to get orgId >>

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

userId

Optional

String

The ID of users to reset password. You need to provide at least one of the email and userId parameters. How to get userId >>

email

Optional

String

The email of users to reset password. You need to provide at least one of the email and userId parameters.

Response Parameters


Name

Data Type

Description

token

String

The token to reset password.

Error Codes


Error Code

Description

31400

Required parameters are missing, or the user ID and email do not match.

31403

The application does not have the permission “Create or delete user accounts in the OU”, and cannot get the token.

31404

The OU or user does not exist, the user is not in the OU, or the OU does not acquire the application.

31429

The times of resetting passwords have reached the limit.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/password/getResetToken?orgId=your_org_ID

method: POST

{

  "userId": "your_user_id"

}

Return Sample


{

  "code": 0,

  "message": "",

  "data": {

    "token": "your_token"

  }

}