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-service.lcsb.uni.lu/minerva/new_api/token/refresh' -X POST \
-d '{"refreshToken":"8Zx8anVngEtcoL5KOAj5H3predQhfXaujI7j05gpz7M"}' \
-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.eyJzdWIiOiJhZG1pbiIsImZpcnN0TmFtZSI6IiIsImxhc3ROYW1lIjoiIiwidHlwZSI6IkFDQ0VTUyIsImp0aSI6ImI1MTI1NGZiLTdiOTUtNDYxZC04MDM4LWJkY2M5MThjMDEwZSIsImlhdCI6MTc5MTk2MzkyMSwiZXhwIjoxNzkxOTY0ODIxfQ.1-urcLinWL_c7OIu_G-vzBsARd7126AoXJ1NPSNo8bXt_7XII4AND3YJLcHzy3rHT5jAt67iFuT22hRsWPVm1Q",
"refreshToken" : "vXkSiA8LvG8BMrjJY3GOmlP_Un5HVubAkmrF-gK56dQ",
"accessTokenExpiresAt" : "2026-10-14T08:00:21Z",
"refreshTokenExpiresAt" : "2026-10-14T09:45:21Z",
"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-service.lcsb.uni.lu/minerva/new_api/token/revoke' -X POST \
-d '{"refreshToken":"a7uGTTKrlII_ALfznitv-u1QDW92VwKcS0bfhJgliEE"}' \
-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"
}