Skip to main content
Kashimi uses the OAuth 2.0 Client Credentials flow to authenticate API requests. Every endpoint requires a valid Bearer token in the Authorization header. Follow the three steps below to obtain and use a token.
1

Encode your credentials

Combine your clientId and clientSecret with a colon, then Base64-encode the result:
2

Request a token

Send a POST request to /api/v1/auth/token with your encoded credentials.HeadersBody (form-encoded)
A successful response returns a JSON object:
3

Use the token

Pass the access_token in the Authorization header of every subsequent API request:

Available Scopes

Request only the scopes your application needs. Requesting excessive scopes increases the blast radius of a compromised token.

Token Expiry

Tokens expire after 1800 seconds (30 minutes). To avoid authentication failures:
  • Track the expires_in value and request a new token before it expires
  • Implement a token refresh mechanism — re-request using the same credentials
  • Never hardcode tokens; always fetch them programmatically at startup and on expiry
If you receive a 401 Unauthorized response on a previously working request, your token has likely expired. Request a new one and retry.

Error Responses