Access control
Scope grants
How API consumers request Optional and Restricted scopes from the API Portal, how admins approve or decline them, and how to grant, revoke and retry scopes on a single subscription.
Consumers request Optional and Restricted scopes from their subscription in the API Portal. You approve or decline those requests from the dashboard under Consumers, Requests, or on the subscription itself. On Keycloak and Auth0, an approved scope is added to the consumer's existing OAuth2 client, so no new credentials are issued.
How does a consumer request an Optional scope?
In the API Portal, the consumer opens the subscription, finds the scope in the Available section, and clicks Request Access. No justification is required. The request lands in your queue with a PENDING status.
- The consumer opens the subscription in the API Portal. Its scopes are listed in four sections: Your Access, Pending Requests, Available, and Requires Approval.
- In the Available section, they locate the scope they want.
- They click Request Access. While the request is in flight the button reads Requesting….
- A confirmation appears: "Request submitted for {scope}".
- The scope moves to Pending Requests with a PENDING badge and the note "Awaiting approval".
How does a consumer request a Restricted scope?
Restricted scopes sit under Requires Approval and need a written reason. The consumer clicks Request with Reason, answers Why do you need this access?, and clicks Submit. The justification travels with the request to the admin.
- The consumer opens the Requires Approval section. Each scope there is marked "Requires business justification".
- They click Request with Reason next to the scope.
- A form opens with the prompt Why do you need this access? and the placeholder "Briefly describe your use case and any risk mitigations…".
- They type a justification. The form recommends a minimum of 20 characters. Submit stays disabled until the field has text.
- They click Submit. While saving, the button reads Submitting….
- The scope moves to Pending Requests with a PENDING badge, and the consumer's own justification is shown back to them.
Where do admins approve or decline scope requests?
In the dashboard, open Consumers, Requests and select the Access tab. Each row shows the requester, the subscription, the requested scope, the plan, and any justification. Use Approve or Decline on the row.
- Go to Consumers, Requests in the dashboard sidebar.
- The tabs read All, Registration, Subscription, Access, each with a count. Open Access to see only scope requests, or use All to see every pending request together.
- Each row shows the requester's name, the subscription and email, the action line "Requests {scope} on {plan}", and, for Restricted scopes, the consumer's justification in quotes.
- To grant the request, click Approve. The row confirms with Approved.
- To turn it down, click Decline, optionally add a reason in Reason (optional), then click Confirm Decline. The row confirms with Declined.
You can also approve and decline from the subscription itself. See How do you manage one subscription's scopes?
Can admins act on several requests at once?
Yes. Select the request rows and the action bar appears at the top. Click Approve Selected to grant them all, or Decline Selected to add one shared reason and Confirm Decline. Each request is processed on its own and shows its own result.
The action bar reports "{count} selected". During a batch each row moves through Queued, then Approving… or Declining…, then Approved or Declined. If a row fails, it stays selected as Failed with the error, so you can retry it without reselecting the rest.
How do you manage one subscription's scopes?
Open the subscription under Consumers → Subscriptions and select its Scopes tab. It lists scopes that need a sync, pending requests, and current grants. From there you can approve or decline requests, grant extra scopes, revoke grants, and retry a sync.
The Scopes tab appears when the subscription's plan has saved access control. The tab has up to three sections:
| Section | What it shows | What you can do |
|---|---|---|
| Needs Sync | Approved scopes that have not reached the Authorization Server yet, with the error and the last attempt | Click Retry sync. A scope marked Awaiting credentials syncs by itself once the subscription has credentials. |
| Pending Requests | Requests waiting for a decision, with the justification | Click Approve, or Decline with an optional reason and Confirm decline. |
| Current Grants | The plan's Active scopes, marked as auto-granted, and every approved scope | Click Revoke on an approved scope, then confirm under Revoke scope. The plan's Active scopes cannot be revoked here. |
To grant a scope nobody requested, click Grant scope in Current Grants. The Grant additional scope dialog has two lists:
- From this plan: the plan's Optional and Restricted scopes that the subscription does not hold yet.
- Beyond this plan: scopes on your Authorization Server that the plan does not include, tagged Not part of this plan.
Select the scopes and click Grant {count}. The grant takes effect at once, with no request step.
When a subscription has pending requests, it also shows a Requests ({count}) tab with the same approve and decline actions.
What happens to a consumer's credentials when you approve a scope?
Nothing changes about their credentials. On Keycloak and Auth0, Apiable binds the new scope to the subscription's existing OAuth2 client. The consumer keeps the same client ID and secret and receives the scope on their next token.
Apiable saves the decision first, then updates the client. If that update does not complete, the approval still stands and the scope moves to Needs Sync on the subscription's Scopes tab. The consumer sees a GRANTED badge with a "Syncing…" note until the update lands.
Apiable does not retry on a schedule. Retry the scope with Retry sync. Apiable also tries again when the subscription's credentials change, for example when they are regenerated or the subscription is promoted to production.
Who gets notified about scope requests?
Apiable emails the plan's approval group when a consumer requests a scope, or your portal's default approval group if the plan has none. It emails the consumer when a request is approved, declined, or revoked, including a scope you grant from the dashboard.
You can change their wording under Portal Settings → Templates, on plans that include email templates. A template that is switched off is not sent. See Approval groups and Email domain and templates.
What does a consumer see after a decision?
The consumer's scope sections update to reflect the outcome, and a notice tells them what happened.
| Decision | What the consumer sees |
|---|---|
| Approved | The scope moves to Your Access with a GRANTED badge. A notice reads "Your request for {scope} was approved". |
| Approved, update in progress | A GRANTED badge with a "Syncing…" note until the Authorization Server update completes. |
| Declined, no reason | A notice reads "Your request for {scope} was declined." The scope returns to its request section. |
| Declined, with reason | A notice reads "Your request for {scope} was declined. Reason: {reason}". |
| Revoked | The scope returns to its request section. |
| Granted with the plan | Scopes set to Active show an AUTO badge and "Included with your plan". These are never requested. |
Which API calls manage scope grants?
Two endpoints. The first requests a grant on a subscription. The second approves, declines or revokes a grant, or retries a grant that needs a sync.
/api/int/subscriptions/{id}/scopegrants /api/int/subscriptions/{id}/scopegrants/{grantId} Troubleshooting
Match the message or state to the fix.
| What you see | What to do |
|---|---|
| No scope sections on the subscription in the API Portal | The plan is not scope-based. They appear only for plans on Client Secret Basic or Private Key JWT with an Authorization Server bound, and at least one scope. |
| "Failed to load your access." in the API Portal | A load error. Click Retry on the same notice. If it persists, check that the Authorization Server is reachable. |
| "Could not submit request. Please try again." | The request did not save. Retry the submission. |
| Submit stays disabled on a Restricted request | The justification is empty. Enter a reason, then click Submit. |
| "No pending access requests" and "You're all caught up." in the dashboard | There are no scope requests waiting. New requests appear on the Access tab as consumers submit them. |
| No Access tab in Consumers, Requests | Scope-based access control is not on for your account, so there are no scope requests to review. |
| A scope stays under Needs Sync, and the consumer sees "Syncing…" | The Authorization Server update did not complete. Read the error on the row, fix the cause, then click Retry sync. On Duende IdentityServer, add the scope in IdentityServer instead. |
| No Scopes tab on a subscription | The subscription's plan has no saved access control, or scope-based access control is not on for your account. |