Skip to main content
Authentication uses a JWT access token and a refresh token, both delivered as cookies by the login call: The tokens are not in the response body.

Sending the tokens

Expired tokens

When the access token expires, any call that carries it returns:
401
1

Refresh

2

Retry once

Retry the original request once.
3

Fall back to login

If the refresh also fails, send the user back to the login screen.
This also applies to the voucher and session calls: a valid api-key does not help if the request carries an expired token. Either refresh first, or don’t send the cookie on calls that only need the API key.
If several requests fail with 401 at the same time, refresh once and retry them all after it completes. The refresh token is single use, so two parallel refresh calls would make the second one fail.