Skip to main content

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.

Least Privilege Principle

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

product.feature.action

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.

readquery & retrieve onlywritecreate, update & delete
Expand a product to view scopes by feature.|

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.

Invite
read
kyb.invite.read

List and retrieve pending and completed business invitations.

write
kyb.invite.write

Create, update, resend, and delete KYB business invites.

Onboarding
write
kyb.onboarding.write

Onboard new businesses through the KYB workflow.

Organization
read
kyb.organization.read

Read organization details, associated users, and business groups.

Verification
read
kyb.verification.read

Read business verification status and UBO task progress.

write
kyb.verification.write

Edit verification data and trigger reverification.

Report
read
kyb.report.read

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​

CodeDescriptionResolution
INVALID_SCOPEThe requested scope is not assigned to your appAdd the scope in Developer Portal → Applications → Scopes
INSUFFICIENT_SCOPEYour token lacks the scope required by this endpointRe-generate the token with the correct scope included

Best practices​

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.