1. Getting access
Once at the start, then every 15 minutes.
- 1The shop
The shop owner opens Pengaturan → Integrasi API (Settings → API integrations), creates an integration, ticks the permissions it needs, then gives you the client ID and client secret. The secret is shown only once. Integrations can be created on the Gold plan and above.
- 2Your system
POST /v1/tokenSend the client ID and secret as HTTP Basic. The response is an access token (tka_…) valid for 15 minutes.
- 3Your system
GET /v1/whoamiSend the token as "Authorization: Bearer tka_…" on every call. Whoami shows the integration's name, permissions, and request limit; useful for checking your setup.
- 4Your system
When the token expires, the API answers 401 access_token_expired. Request a new token with the same client ID and secret; there is no refresh token.
- The client ID and secret are accepted only at /v1/token. Store the secret like a password.
- Rotate the secret without downtime: create a new secret on the integration page, deploy it, then revoke the old one. A revoked secret is refused at once, including tokens already issued.