Short-lived access token / long-lived refresh token endpoints. On login (POST /minerva/api/doLogin) the response contains an
accessToken, a refreshToken and their lifetimes. Send the access token as Authorization: Bearer <token> on API calls,
and use the endpoints below to keep the session alive. Do not send the (possibly expired) access token as a Bearer header
when calling these endpoints.
The endpoints are served from /new_api/token.
1. Refresh the access token
Rotates the refresh token and returns a new access/refresh pair. The previous refresh token becomes invalid, so the returned
refreshToken must replace the stored one. A 401 response means the refresh token is unknown, expired or was reused - the
client should log in again.
1.1. HTTP request
POST /minerva/new_api/token/refresh HTTP/1.1
1.2. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
the raw refresh token previously issued to the client |
1.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/token/refresh' -X POST \
-d '{"refreshToken":"f4ozqA-G2AEwORQrtQqxTnbB0sw5G8sb6V7OFuOaI2E"}' \
-H 'Content-Type: application/json'
1.4. HTTP response
HTTP/1.1 200 OK
1.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
short-lived bearer access token (send as 'Authorization: Bearer <token>') |
|
|
new refresh token; the previous one is rotated away and must be replaced with this value |
|
|
absolute access token expiration (ISO-8601 with zone offset) |
|
|
absolute refresh token expiration (ISO-8601 with zone offset) |
|
|
access token lifetime in seconds (prefer over the absolute value for scheduling refreshes) |
|
|
refresh token (sliding inactivity window) lifetime in seconds |
1.6. Sample Response
{
"accessToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImZpcnN0TmFtZSI6IiIsImxhc3ROYW1lIjoiIiwidHlwZSI6IkFDQ0VTUyIsImp0aSI6ImMwMWZkMzhlLTdmMGYtNDYwZS1iM2Y3LTdiNzY5M2FjMmEyZCIsImlhdCI6MTc5MDIwNTIwNSwiZXhwIjoxNzkwMjA2MTA1fQ.nuUuLHrF8-xhNZ2fiWEwnJIALoXJx8jOp8fqKDYmhZE7hX9vV3NCpQiVN4VTakJMROhSxW1m8rqMLFEdDy6AoA",
"refreshToken" : "RoUyU6f8Df_XNoZOK18_eFc-LGcnL9VE7AVVc4mxKE4",
"accessTokenExpiresAt" : "2026-09-23T23:28:25Z",
"refreshTokenExpiresAt" : "2026-09-24T01:13:25Z",
"accessTokenExpiresIn" : 900,
"refreshTokenExpiresIn" : 7200
}
2. Revoke a refresh token (logout)
Revokes the whole rotation chain the refresh token belongs to and drops its outstanding access tokens.
2.1. HTTP request
POST /minerva/new_api/token/revoke HTTP/1.1
2.2. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
the raw refresh token previously issued to the client |
2.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/token/revoke' -X POST \
-d '{"refreshToken":"YyEMP2GHP6yLlEFWW8t1K-QjJhqKivPc0hHX4beFyqI"}' \
-H 'Content-Type: application/json'
2.4. HTTP response
HTTP/1.1 200 OK
2.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
status message |
2.6. Sample Response
{
"status" : "OK"
}