Skip to main content
Tanda uses short-lived bearer tokens. You exchange two credentials for a token, then send the token on every request.

Your credentials

Find both in the dashboard under Developers → API keys. Sandbox and production have separate key pairs.
Anyone with your API key can move money from your wallet. Store it in an environment variable or secrets manager, never in client-side code or source control. If it leaks, rotate it in the dashboard straight away.

Generate a token

Call Generate bearer token with the API key in the api-key header and the public key in the body.
Response

Use the token

Send it in the Authorization header on every other endpoint.

Refresh before it expires

Tokens last one hour. expiresAt is the expiry as a Unix timestamp in seconds. Cache the token with its expiry, refresh a minute early, and if a request still returns 401, mint a new token and retry once.
Token cache (Node.js)

Good practice

  • Mint tokens on your backend only. Browsers and mobile apps should call your server, never Tanda directly.
  • Keep token refresh in one place so every part of your system uses the same cache.
  • Don’t retry a 401 in a loop. One fresh token and one retry is enough; after that, alert someone.