Get required scopesv3.1
Experimental: this endpoint is in beta and its contract may change.
Recommends the required scopes to use the given set of tools.
Authorization
ApiKeyAuth Project API key authentication
In: header
Path Parameters
Toolkit to recommend scopes for.
Request Body
application/json
Tool slugs to recommend scopes for; an empty list computes the recommendation across all of the toolkit’s tools.
Auth scheme the connection will use. Defaults to OAUTH2.
"OAUTH2"OAUTH2OAUTH1API_KEYBASICBILLCOM_AUTHBEARER_TOKENGOOGLE_SERVICE_ACCOUNTNO_AUTHBASIC_WITH_JWTCALCOM_AUTHSERVICE_ACCOUNTSAMLDCR_OAUTHCIMD_OAUTHS2S_OAUTH2Toolkit version to compute from; defaults to the latest published version. Pass a concrete version to pin.
"latest"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.
Scopes the recommendation must include, irrespective of usage.
Scopes the recommendation must not include; the solver picks documented alternatives and fails when none exist.
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 Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v3.1/toolkits/string/scopes/recommended" \ -H "Content-Type: application/json" \ -d '{ "tools": [ "GOOGLECALENDAR_EVENTS_LIST", "GOOGLECALENDAR_CREATE_EVENT" ] }'{ "auth_scheme": "OAUTH2", "toolkit_version": "20260915_00", "grant_context": {}, "scopes": { "least_privilege": [ "https://www.googleapis.com/auth/calendar.calendars.readonly", "https://www.googleapis.com/auth/calendar.events" ], "fewest": [ "https://www.googleapis.com/auth/calendar" ], "conditional": [ { "scope": "https://www.googleapis.com/auth/calendar.calendars.readonly", "when": { "param.eventType": [ "default" ], "param.exclude_organizer": [ "falsy" ] }, "for": [ "GOOGLECALENDAR_CREATE_EVENT" ] } ] }}