Scopes
Scopes control what actions an application can perform. Each app type has its own scope set.
Only request the scopes you need. Requesting unnecessary scopes increases security risk and may require additional user consent.
M2M Scopes
M2M (Machine-to-Machine) applications use dot-notation scopes (product.feature.action) to control API access. Assign scopes in the Developer Portal configure modal — grouped by product and feature, matching the catalog below.
For endpoint-level scope requirements, see Token Scopes in the API reference.
Scope format
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 scopes (by product)
Scopes are grouped by product, then feature. Each row is a scope string you assign to the app or pass in accessTokenScopes when requesting a token.
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.
M2M scopes are for server-to-server API access only. They cannot be used for user authentication or login flows.
IDP Scopes (OIDC)
IDP applications use OIDC scopes to control what identity information is returned.
| Scope | Description | Claims Returned | Required |
|---|---|---|---|
openid | Required for OIDC | sub | ✅ Yes |
profile | Basic profile | name, given_name, picture | ○ No |
email | Email address | email, email_verified | ○ No |
phone | Phone number | phone_number, phone_number_verified | ○ No |
Hosted UI Scopes
Hosted UI does not use scopes. Access is controlled via the hosted auth flow and token claims.
Scope Assignment
Scopes are assigned from the Developer Portal when you create or edit an application:
- Open Applications in the portal and pick the application.
- Open the Scopes section.
- Tick the scopes the application needs (M2M and IDP); Hosted UI does not expose this picker.
- Save — new tokens issued after the change carry the updated scope set.
See Create application — step-by-step for the full registration walkthrough.
Default Scopes
- IDP: If no scopes provided, defaults to
openid,profile,email - M2M: No default scopes; all scopes must be explicitly assigned
- Hosted UI: No scopes applicable
Scope Definitions (IDP)
export const WebScopeDefinitions = {
[WebAppScopes.OPENID]: {
scope: "openid",
description: "Required for OpenID Connect authentication",
fields: ["sub"],
},
[WebAppScopes.PROFILE]: {
scope: "profile",
description: "Access to basic profile information",
fields: [
"name",
"given_name",
"family_name",
"picture",
"preferred_username",
"updated_at",
],
},
[WebAppScopes.EMAIL]: {
scope: "email",
description: "Access to email address",
fields: ["email", "email_verified"],
},
[WebAppScopes.PHONE]: {
scope: "phone",
description: "Access to phone number",
fields: ["phone_number", "phone_number_verified"],
},
};
Using M2M Scopes
Requesting Scopes During Token Acquisition
curl -X POST "https://sandbox-api.chainit.online/v1/auth/token" \
-H "Content-Type: application/json" \
-u "{clientId}:{clientSecret}" \
-d '{
"accessTokenScopes": [
"kyb.invite.read",
"file.upload.write",
"pactvera.request.read"
]
}'
Verifying Scopes in Token
Decoded access token contains the granted scopes:
{
"scope": "kyb.invite.read file.upload.write pactvera.request.read",
"permissions": [
"kyb.invite.read",
"file.upload.write",
"pactvera.request.read"
],
"azp": "<<your_client_id>>",
"exp": 1715086400
}
Error Responses
| Code | Description | Action |
|---|---|---|
INVALID_SCOPE | Requested scope not assigned to app | Update app scopes in dev-portal |
INSUFFICIENT_SCOPE | Token does not have required scope for endpoint | Request token with proper scopes |
Best Practices
Least privilege: Only request scopes you need
Validate server-side: Always verify scopes on the receiving end
Token scopes: Granted scopes may be a subset of requested scopes
M2M scopes are for server-to-server API access only. They cannot be used for user authentication or login flows.