Rappi2 uses JWT Bearer tokens for authentication. Every protected endpoint requires anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JorLOrT/rappi2/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <token> header. Access tokens are short-lived (15 minutes by default) and must be refreshed using a longer-lived refresh token (7 days). Both lifetimes are configurable via the ACCESS_TOKEN_EXPIRE_MINUTES and REFRESH_TOKEN_EXPIRE_DAYS environment variables.
Getting a token
Send your credentials toPOST /api/auth/login to receive an access token and a refresh token.
The login endpoint uses OAuth2 form encoding, not a JSON body. Submit your credentials as
application/x-www-form-urlencoded fields named username and password. Sending a JSON payload will result in a validation error.TokenPair:
expires_in is the access token lifetime in seconds (900 = 15 minutes). Store both tokens; you will need the refresh token to obtain a new access token without re-entering credentials.
Using the token
Pass the access token in theAuthorization header for every protected request:
/api/auth/me endpoint returns the profile of the currently authenticated user, including their assigned role and permissions.
Refreshing tokens
When an access token expires, exchange the refresh token for a new token pair. The old refresh token is revoked on use — store the new one returned in the response.Logging out
Revoke the refresh token to invalidate the session. Subsequent attempts to refresh using that token will be rejected.Token expiry
When an access token expires, any protected endpoint returns a401 Unauthorized response:
POST /api/auth/login.