Authentication
All requests to the Tesser API must include a valid access token. Tokens are generated using your API credentials, which are provisioned in the Tesser Dashboard.
Environments
Tesser has two environments. Each has its own credentials, token endpoint, audience, API host and dashboard. A token from one environment does not work in the other.
| Production | Sandbox | |
|---|---|---|
| API | https://api.tesser.xyz | https://api-sandbox.tesser.xyz |
| Token URL | https://tesser-payments.us.auth0.com/oauth/token | https://auth-sandbox.tesser.xyz/oauth/token |
| Audience | https://api.tesser.xyz | https://api-sandbox.tesser.xyz |
| Dashboard | dashboard.tesser.xyz | dashboard-sandbox.tesser.xyz |
| MCP | https://api.tesser.xyz/v1/mcp | https://api-sandbox.tesser.xyz/v1/mcp |
Sandbox also accepts tokens from the earlier token URL https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token and for the earlier audience https://sandbox.tesserx.co, so existing integrations keep working. Use the values in the table for new ones.
To use the API from an AI assistant through MCP, see MCP Integration.
Credentials
Each workspace has a Client ID and Client Secret pair. You can find these in the Tesser Dashboard under Settings > API Keys. Keep your client secret secure and never expose it in client-side code or public repositories.
Generate an API Token
To obtain an access token, send a POST request to the token URL of your environment with your credentials and that environment's audience.
Production:
Code
Sandbox:
Code
Token Response
A successful request returns a JSON response containing your access token:
Code
| Field | Description |
|---|---|
access_token | The token to include in API requests |
token_type | Always Bearer |
expires_in | Token lifetime in seconds (default: 86400 = 24 hours) |
Using the Token
Include the access token in the Authorization header of every API request to the same environment's API. This example uses production; in sandbox, use https://api-sandbox.tesser.xyz.
Code
Token Expiration
Tokens expire after the duration specified in expires_in (default 24 hours). When a token expires, the API returns a 401 Unauthorized response.
To maintain uninterrupted access:
- Request a new token before the current one expires.
- Do not cache tokens indefinitely.
- There are no refresh tokens. Simply request a new token using the same credentials.