You can use a refresh token to renew the access tokens of the All and Custom types. An access token expires after 30 minutes. You can use the Renew Token REST API to renew the access token for another 30 minutes within 14 days after the access token's expiration.
Important
Remember to use the latest access and refresh tokens in the Renew Token REST API. If you use a previous or older set of access and refresh tokens:
-
All access tokens in the create and renew chain will be invalidated and deleted.
-
If your email exists in your Commvault Cloud user profile, you will receive an email with details.
-
You must create a new access token.
Renew Token API Request to Renew the Access Token
Syntax
POST <webservice>/V4/AccessToken/Renew HTTP/1.1
Host: <host name>
Accept: application/xml
Authorization: Bearer {{AccessToken}}
{
"accessToken" : "{{AccessToken}}",
"refreshToken" : "{{RefreshTokenofExpiredAccessToken}}"
}
where <webservice> is the root path used to route the API requests to the Web Server.
For more information, see Available Web Services for REST API.
Request Parameters
Name |
Description |
Required |
---|---|---|
AccessToken |
The access token for executing APIs. If the access token is not known, use the Create Access Token API to create a new token. |
Yes |
RefreshTokenofExpiredAccessToken |
The token used for refreshing or renewing the access token. The RefreshToken is created along with the AccessToken in the Create Access Token API. |
Yes |
Request Headers
Name |
Description |
---|---|
Host |
The host name of the Web Server or Web Console used in the API request. |
Accept |
The format of the response. Valid values are: application/xml or application/json. |
Authorization |
The bearer token or access token that you can create for yourself or for a user group. For more information, see the Create Access Token API. |