Skip to main content
POST
Get required scopes

Authorizations

x-api-key
string
header
default:your-project-api-key
required

Your Composio project API key. Create or copy it from the Composio dashboard.

Path Parameters

toolkit_slug
string
required

Toolkit to recommend scopes for.

Minimum string length: 1

Body

application/json
tools
string[]
required

Tool slugs to recommend scopes for; an empty list computes the recommendation across all of the toolkit’s tools.

auth_scheme
enum<string>
default:OAUTH2

Auth scheme the connection will use. Defaults to OAUTH2.

Available options:
OAUTH2,
OAUTH1,
API_KEY,
BASIC,
BILLCOM_AUTH,
BEARER_TOKEN,
GOOGLE_SERVICE_ACCOUNT,
NO_AUTH,
BASIC_WITH_JWT,
CALCOM_AUTH,
SERVICE_ACCOUNT,
SAML,
DCR_OAUTH,
CIMD_OAUTH,
S2S_OAUTH2
toolkit_version
string
default:latest

Toolkit version to compute from; defaults to the latest published version. Pass a concrete version to pin.

Minimum string length: 1
grant_context
object

Context in which you want to grant scopes to your user. Pass a dimension and its selected value, for example {"account_type": "Google Workspace"}. Use the List grant contexts endpoint to discover available dimensions and values.

include
string[]

Scopes the recommendation must include, irrespective of usage.

exclude
string[]

Scopes the recommendation must not include; the solver picks documented alternatives and fails when none exist.

available_scopes
string[]

Scopes your OAuth app can request. The recommendation never names a scope outside this list and fails with scope_not_available when a tool cannot be covered inside it. Omit for an unbounded recommendation.

Response

Successfully recommended scopes for the requested tools

auth_scheme
string
required

Auth scheme the recommendation was computed under.

toolkit_version
string
required

Concrete toolkit version the answer was computed from; pass it back as toolkit_version to pin.

grant_context
object
required

The effective grant_context the recommendation was computed with - the toolkit default overlaid with your overrides; {} when none applies.

scopes
object
required