Reset Authentication Token

PUT api/v1.2/accounts/token

Use this API to reset your authentication token. Users with relevant permissions can also use this API to reset the authentication tokens of other users in the account.

Required Roles

Users with the following permissions can use this API to reset the authentication tokens of other users:

  • Users who belong to the system-admin group.
  • A user who has the manage users permission. See Managing Roles for more information.

Note

A user can reset his authentication token if he has the authentication token permission on accounts.

Parameters

You must pass at least one of the parameters (emails or groups) in the API body. If you pass both parameters, a union of the users present in the emails parameter and the users present in the groups parameter is considered.

Parameter Description
emails

Provide the email ID of the user whose authentication token you want to reset. Use comma-separated values to provide multiple email IDs.

Note

When resetting multiple tokens using the emails parameter, no user token is reset if any of the email IDs passed are invalid or not part of the account.

groups

Provide the name of the group whose authentication token you want to reset. Use comma-separated values to provide multiple groups.

Note

When used for a group, this resets the authentication tokens of all the users present in that group. In case of any errors, no user token is reset.

If your authentication token is successfully reset (by you or by another user), you will receive a confirmation email.

Request API Syntax

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d {"emails": "<emails>", "groups": "<groups>"}' \ "https://api.qubole.com/api/v1.2/accounts/token"

Note

The above syntax uses https://api.qubole.com as the endpoint. Other endpoints to access QDS are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample Requests

Sample Request Using both the Parameters

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-H 'cache-control: no-cache' -d '{"emails": "[email protected],[email protected]", "groups": "group_1,group_2"}' \
"https://api.qubole.com/api/v1.2/accounts/token"

Sample Request Using only the emails Parameter

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-H 'cache-control: no-cache' -d '{"emails": "[email protected]"}' \ "https://api.qubole.com/api/v1.2/accounts/token"

Sample Request Using only the groups Parameter

curl -i -X PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-H 'cache-control: no-cache' -d '{"groups": "group_1}' \ "https://api.qubole.com/api/v1.2/accounts/token"

Sample Response

{
   "message": "Tokens updated successfully"
}