Tools

Get required scopes for tools

Resolves required scopes for the specified tools at a given toolkit version. All requested tools must belong to the same toolkit. Returns the flat scope union plus per-tool structured scope requirements when available.

post/api/v3.1/tools/scopes/required

Request body

toolsstring[] required

Tool slugs to resolve scopes for. All tools must belong to the same toolkit.

versionstring

Toolkit version to resolve scopes against for the requested toolkit. Defaults to the pinned HTTP version when omitted.

Example request

{
  "tools": [
    "GMAIL_FETCH_EMAILS",
    "GMAIL_SEND_EMAIL"
  ],
  "version": "latest"
}

Response

Successfully retrieved scopes for the specified tools

scopes_requiredstring[] required

A combined list of all unique scopes required by the specified tools

Example response

{
  "scopes_required": [
    "channels:read",
    "chat:write",
    "https://www.googleapis.com/auth/gmail.modify",
    "repo",
    "user:email"
  ]
}

Changes

Changed in 4 of the 61 revisions of this API.18

    • added the optional property per_tool_requirements/items/scope_requirements/all_of/items/anyOf[subschema #2]/any_of/items/anyOf[subschema #2]/source to the response with the 200 status

      response-optional-property-added

    • added the optional property per_tool_requirements/items/scope_requirements/all_of/items/anyOf[subschema #2]/source to the response with the 200 status

      response-optional-property-added

    • added the optional property per_tool_requirements/items/scope_requirements/source to the response with the 200 status

      response-optional-property-added

  • b61c29327d7412See the full diff
    • the per_tool_requirements/items/scope_requirements/all_of/items/anyOf[subschema #2]/any_of/items/ response's property type/format changed from string/ to / for status 200

      response-property-type-changed

    • added the optional property per_tool_requirements/items/scope_requirements/all_of/items/anyOf[subschema #2]/when to the response with the 200 status

      response-optional-property-added

    • added subschema #1 subschema #2 to the per_tool_requirements/items/scope_requirements/all_of/items/anyOf[subschema #2]/any_of/items/ response property anyOf list for the response status 200

      response-property-any-of-added

    • the endpoint scheme security CookieAuth was removed from the API

      api-security-removed

    • the endpoint scheme security UserApiKeyAuth was removed from the API

      api-security-removed

    • endpoint added

      endpoint-added