Authentication
Securing API access with authentication
Authentication
All requests to the CrissCross APIs (Collect, Exchange, and Payouts) require an access token. CrissCross uses OAuth 2.0 style access tokens for authenticating API requests. Authentication is machine-to-machine: request a token with your client_id and client_secret, then include it as a Bearer token in the Authorization header on every subsequent request.
Request an access token
POST https://api.crisscross.money/v1/auth/oauth2/token
Response
Store the token until it expires. expires_in is the token’s lifetime in seconds (currently 86400, or 24 hours). There is no refresh token; request a new token when the current one expires.
Use the token
Handling authentication failures
400 Bad Request:client_idorclient_secretis missing from the request body.401 Unauthorized: the credentials are invalid, or the access token is missing or expired.
Best practices
- Secure storage: keep your
client_secretand access tokens in a secrets manager or environment variables, never in source code. - Rotate on compromise: if your
client_secretis exposed, rotate it immediately.