Auth: Bearer token is expired?

Today I noticed that the Bearer token I was used to test SN API outside of Swagger UI is expired: I’m receiving {"detail":"invalid credentials (jwt error)"} server response. How long the JWT lasts?

Here is what I have found:
server-timing: 1_deps;dur=3.025,2_endpoint;dur=161.858,3_queries;dur=35.453,5_jsonable_encoder;dur=0.100,6_render;dur=0.011 strict-transport-security: max-age=31536000; includeSubDomains; preload
Are the values in seconds? If so, ‘31536000’ equals to 365 days (if I’m not mistaken)?

Yep, so JWT tokens only last for 3600 minutes, and then you need to login again to get a new token.

We will be moving to an API Key system soon though, and those will not expire.

1 Like