1. Home
  2. ...
  3. FAQs
  4. How can I set the expiration time of an access token?

How can I set the expiration time of an access token?

The Expires In field, the value hierarchy between token and API, and changes via the API Manager.

Using the Manager's interface, you can configure the expiration time of an access token when registering a token, by filling in the field Expires In with a value in seconds.

NOTE

Bear in mind that the value entered in the field will not be respected if there is a conflict with the token expiration value configured in the API being consumed.

Manager behaviour

  • The Expires In field can be left blank. In this case, the access token's expiration value will be the one inserted in the registration data of the API the token will be linked to. If this value is also blank, the default expiration time will be used (configured in Settings > OAuth Config).
  • If there's a value entered in the token's registration and it is different from the value entered in the API registration, the value in the API registration takes precedence and it will be set as the token's expiration time.

Once registered, you can't change the expiration time of a token through the Manager's edit screen. However, you can alter it by calling the API Manager (which is an API provided by Sensedia and hosted on your Manager):

Make a PUT request to the endpoint <manager_url>/api-manager/api/v3/access-tokens/{code}.

In the expiresIn property, inform the expiration time in seconds, in number format.

For more information, you can consult the API Manager's Swagger through the Manager interface:

Click on the Icon icon next to your user name;

Click on API Manager Browser.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more