Authorization header. Tokens have an expiration time and can be refreshed without logging in again. For Coinbase integration, TaxMaxi also supports an OAuth flow that the CLI handles automatically, but you can drive it yourself via the API if needed.
Register
SendPOST /auth/register with your email, a password of at least 8 characters, and an optional display name:
A successful
201 response starts the email verification flow:
409 error. If the password is too short or weak, you receive a 400 error with a list of unmet requirements.
Verify your email
After registration, TaxMaxi sends a verification code to your email. Submit it toPOST /auth/verify-email:
A successful response returns a
redirectTo path indicating your account is verified and you can proceed to log in. If the code is invalid or has expired, you receive a 400 error. To resend a code, call POST /auth/resend-verification with no body.
Log in
Authenticate withPOST /auth/login. For a local (email and password) account, set provider to "local" and pass your credentials in the credentials object:
Authenticate requests
Pass the session token as a Bearer token on every request that requires authentication:401 Unauthorized if the token is missing, invalid, or expired.
Refresh a session
To extend a session without logging in again, callPOST /auth/refresh while you still have a valid token:
token and updated expiresAt. Replace your stored token with the new one.
OAuth with Coinbase
To connect a Coinbase account, TaxMaxi uses an OAuth flow. The easiest way to run it is with the CLI:- Call
GET /auth/authorize/coinbaseto get an authorization URL:
- Redirect your user to
redirectUrl. - After the user authorizes, poll
GET /auth/oauth/:id(where:idis the OAuth session identifier from the authorization response) to check the flow status:
status field cycles through "pending", "completed", "failed", or "expired". When status is "completed", use the sessionToken as your Bearer token for subsequent requests.
Log out
Invalidate the current session withPOST /auth/logout: