Token Scopes
Access tokens in ChainIT APIs are scope-based — every token is limited to exactly the resources and operations you declare. This enforces the principle of least privilege: your application can only touch what it needs.
When requesting an access token, pass the precise scopes required. Tokens are issued only with the permissions allowed by those declared scopes.
Always request the minimum set of scopes your integration needs. Over-permissioned tokens increase your attack surface and may require additional consent steps.
Scope format
Every M2M scope follows a consistent three-part dot-notation:
Anatomy of a scope
e.g. kyb.invite.read reads business invites · kyb.invite.write creates and manages them
product
The service area — e.g. kyb, kyc, file.
feature
The resource within that product — e.g. invite, report.
action
read to query · write to create, update & delete.
Available M2M scopes
Scopes are grouped by product, then by feature. Each feature lists the actions it exposes — read for querying and write for creating, updating, or deleting.
The KYB (Know Your Business) scope grants access to business onboarding and verification — verification workflows, organization compliance data, verification status retrieval, and the full onboarding lifecycle. Required for platforms onboarding and managing business entities.
List and retrieve pending and completed business invitations.
Create, update, resend, and delete KYB business invites.
Onboard new businesses through the KYB workflow.
Read organization details, associated users, and business groups.
Read business verification status and UBO task progress.
Edit verification data and trigger reverification.
Generate and read KYB compliance reports.
Requesting scopes
Pass the exact scope strings in the accessTokenScopes array when generating a token:
curl -X POST "https://api.chainit.com/oauth/token" \
-H "Content-Type: application/json" \
-u "{clientId}:{clientSecret}" \
-d '{
"accessTokenScopes": [
"kyb.invite.read",
"kyb.verification.read",
"file.upload.write"
]
}'
The issued token will contain only the granted scopes. Verify them in the decoded payload:
{
"scope": "kyb.invite.read kyb.verification.read file.upload.write",
"permissions": ["kyb.invite.read", "kyb.verification.read", "file.upload.write"],
"azp": "<<your_client_id>>",
"exp": 1715086400
}
Error responses
| Code | Description | Resolution |
|---|---|---|
INVALID_SCOPE | The requested scope is not assigned to your app | Add the scope in Developer Portal → Applications → Scopes |
INSUFFICIENT_SCOPE | Your token lacks the scope required by this endpoint | Re-generate the token with the correct scope included |
Best practices
- Least privilege: Only request the scopes your integration actually uses — not entire products.
- Separate concerns: Use different tokens for different services where possible (e.g. one token for KYB, another for file uploads).
- Validate server-side: Always verify scopes on the API endpoint, not just at the client.
- Rotate credentials: Periodically rotate client secrets and re-issue tokens to limit blast radius if credentials are compromised.
- Monitor usage: Track which scopes are actively used and remove unused ones from your application config.