Do the REST API login tokens expire?

If they expire, what is the expiration time?

Cheers

Hi,

Login tokens expire after 30 hours. The plan is to add non-expiring API only tokens that can be created/revoked but have no timeline for that feature.

1 Like

Another good feature I think is to add a refresh token. As is, you have to hold on to the original credentials (or ask for them again) in order to refresh the token.

Do we have this non expiring tokens available now?

Can we re configure the expiry time according to our needs while using the dremio?

The expiry time is currently not configurable. What we usually do is have the code that does the API call check if the response is a 401 and if so we redo the login step and then redo the API call.

The redo login step is after expiry of 30 hours which is set by default.

Correct me if I am wrong.

Yes the current timeout is 30 hours.

@doron any Update from the token expire side, or still we need to recreate the toke after 30 hours?

Its usually best to have code that handles on each request any error status codes including authentication ones - then simply re-authenticate and rerun the API request.

Thanks @doron for the Update.

@doron is there a API where I can validate the token.?

There is no validation endpoint - you can just send it to any endpoint and get a 401.

1 Like

For reference this is defined in TokenManagerImpl.java#L58 for anyone you wants to check the latest value

1 Like