Do the REST API login tokens expire?


#1

If they expire, what is the expiration time?

Cheers


#2

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.


#3

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.


#4

Do we have this non expiring tokens available now?

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


#5

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.


#6

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

Correct me if I am wrong.


#7

Yes the current timeout is 30 hours.


#8

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


#9

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.


#10

Thanks @doron for the Update.