Refresh Token

Exchange a valid refresh token for a new access token and a rotated refresh token. The token can be supplied via HttpOnly cookie or as refresh_token in the request body. Reuse of an already-consumed token immediately revokes the entire token family.

POSThttps://api.marinahealth.eu/auth/refresh

Request Body

Body Parameters

NameTypeRequiredDescription
refresh_tokenstringoptionalRefresh token. If omitted, the token is read from the HttpOnly cookie.

Example Request

cURL
curl -X POST https://api.marinahealth.eu/auth/refresh \
  -b cookies.txt \
  -c cookies.txt

Response

Successful
FieldTypeDescription
access_tokenstringNew JWT access token.
refresh_tokenstringNew rotated refresh token. Also set as an HttpOnly cookie.
token_typestringAlways "Bearer".
expires_innumberAccess token lifetime in seconds.
json
{
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "refresh_token": "new_opaque_refresh_token",
  "token_type": "Bearer",
  "expires_in": 900
}