Auth

Verify the bearer token is valid

GET
/api/auth/verify-token

Cheap probe that verifies the access token in the Authorization header is signed and unexpired. Returns 200 with a confirmation message when valid, 401 otherwise. A 401 always carries a code: TOKEN_EXPIRED means the token ran out and the refresh token behind it should be used, while TOKEN_INVALID means the session is over. Treating the two alike signs out a session that was never refused. Only a 401 is a verdict on the token: a 503 with AUTH_UNAVAILABLE means the check itself failed, and any other non-2xx comes from something in front of the API, so neither should end the session. Used by the client to gate startup before mounting authenticated routes.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/auth/verify-token"
{  "message": "Token is good"}