Error codes

Every error is a ProblemDetails (RFC 7807): title, status, detail, traceId; 422 adds errors.

ProblemDetails
{
  "title": "Forbidden",
  "status": 403,
  "detail": "insufficient_scope: cần gis.parcels.view",
  "traceId": "req_b9a0…"
}
CodeCauseFix
400 invalid_requestA required parameter is missing (e.g. token request without client_secret).Read the detail field.
400 invalid_grantCode is wrong / expired (60 seconds) / already used, or redirect_uri does not match.Have the farm install again for a new code; redeem it immediately.
401 invalid_clientWrong App ID / App Secret, an old secret past its 24 hours, or the app is suspended.Check the secret in App settings › App Secret.
401 token_revokedThe farm removed the app / changed scopes, or the app was deleted or suspended — old tokens die immediately.Request a new token.
401Wrong, expired or revoked key / token.Recreate it or Generate Access Token.
403 access_deniedThe farm has not installed the app (or removed it).Send the install link.
403 insufficient_scopeThe token lacks the scope for this operation.Add it in Use cases; the farm re-consents.
403 workspace.developer_sandbox_outbound_blockedDeveloper workspaces cannot send anything outside (Zalo OA, email, farm mailbox, public camera).Expected — use a real farm if needed.
404No such data, or it belongs to another farm.Check the id.
409Duplicate / wrong state (e.g. inviting the same member twice, reporting an app twice in 7 days).Read detail.
422Invalid request body — the errors field lists each problem.snake_case JSON; send [] for empty arrays.
429Over 600 calls/minute (app × farm / key) or 10/minute/IP for /oauth/token.Wait Retry-After seconds.
5xxNextFarm server error.Retry with backoff; send the traceId (X-Correlation-ID) to support.

Debug quickly: API Explorer · Token Debugger · API Logs of your app.