Obtain a token
POST /oauth/token accepts HTTP Basic (recommended) or client_id / client_secret in the form body. The only supported grant_type is client_credentials. The response is always JSON.
invalid_client, not the /v1 error envelope.
Use the token
Send it on every/v1 request:
aud is inra-partners-api), and is valid for 15 minutes. Request a new one when it is close to expiry. Reusing an expired token returns 401 with the code unauthorized.
Verify a token (optional)
The signing keys are atGET /.well-known/jwks.json. The JWT header includes a kid:
- Sandbox:
sandbox-1 - Production:
prod-1
Scopes
A token is issued with the scopes granted to your client. The current catalogue is:
If your token is missing a scope, the API returns
403 with the code insufficient_scope. Email inraasth@inra.co.th if you need a scope that was not issued.
Rate limits
Limits are per client and per bucket, and can be agreed individually. The defaults for a new client are:
When you exceed a limit the API returns
429 with the code rate_limited and a Retry-After header (seconds). Back off and retry.

