Authentication
Magne uses JWT (JSON Web Tokens) for API authentication with a refresh token rotation scheme.Auth Flow
1
Register or Login
Call
POST /v1/auth/register or POST /v1/auth/login to receive an initial token pair.2
Use the Access Token
Include the
token in the Authorization header for all authenticated requests:3
Refresh When Expired
Access tokens are short-lived. When expired, use the refresh token:This returns a new access token AND a new refresh token (rotation). The old refresh token is invalidated.