Authorization header:
Environments
Each environment uses separate access tokens. Use sandbox tokens for development and testing.
Best Practices
- Server-side only: Never expose access tokens in client-side code
- Use HTTPS: All API requests must be made over HTTPS
- Store securely: Use environment variables or a secrets manager to store access tokens
Error Handling
If authentication fails, the API returns a401 Unauthorized response. Common causes:
- Missing or malformed
Authorizationheader - Invalid or expired access token
- Using a sandbox token against production (or vice versa)