POST /auth/refresh

Obnoví expirovaný JWT token pomocí refresh tokenu.

application/json

Body Required

  • refresh_token string Required

    Refresh token získaný při přihlášení

Responses

  • 200 application/json

    Token úspěšně obnoven

    Hide response attributes Show response attributes object
    • token string
    • expires_at string(date-time)
  • 401 application/json

    Chyba autentizace

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 500 application/json

    Chyba serveru

    Hide response attributes Show response attributes object
    • code string
    • message string
POST /auth/refresh
curl \
 --request POST 'https://api.mstonjek.cz/v1/auth/refresh' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"refresh_token":"a1b2c3refreshToken..."}'
Request examples
{
  "refresh_token": "a1b2c3refreshToken..."
}
Response examples (200)
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_at": "2025-01-01T12:00:00Z"
}
Response examples (401)
{
  "code": "UNAUTHORIZED",
  "message": "Token není platný"
}
Response examples (500)
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Server momentálně nedostupný"
}