You are here

Refreshing an access token

After one hour, your application's access token will be invalid. You can use the refresh token to request a new access token without having to re-authenticate with the user. The refresh token is valid for 7 days or until a new access token is requested.

When the access token expires, API requests will receive an HTTP 401 response with the following body:

  "error_description":"The access token expired"
Note: The error description The access token expired is the only way your application can recognize this error. Your application should request a new access token using the refresh token.

You make a request to refresh the access token using the refresh token, the API Key, and the API Secret.

The response will have a body similar to the following:


Note that you can refresh the access token at any time before the timeout expires. The old access token becomes invalid when the new one is granted. The new refresh token supplied in the response body can be used in the same way.

In the Mobile SDK for iOS the refreshAccessToken method of the OAuthHelper class is used.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.