Skip to main content
A scope limits what an install can read or change through the Reintersect API. You never list scopes on the app. Each piece declares the scopes its own handlers use, and subscribed events add the read scopes they imply. The app’s scopes are the union of these, and admins see the list on the consent screen.

Scope list

For now, read scopes only control which events your app receives. Apps have no read endpoints. Some things need no scope:
  • Rendering your own blocks and running their actions when a member clicks.
  • Resolving and searching your own references.
  • Reading, querying and revalidating your own blocks.
  • Updating the block an action runs on with its interaction token, within 15 minutes.
  • The app.installed, app.uninstalled, app.reconsentRequired, block.created and block.removed events.

Declaring scopes

Declare scopes on the piece whose code uses them:
This piece contributes replies:write from its options and decisions:read from the event it handles. Blocks contribute the scopes of their actions. Routes contribute none and may only use scopes that other pieces declare. Calling a method the piece’s scopes don’t cover is a type error: the method’s type becomes RequiresScope<"blocks:write">, which names the scope to add. An unknown scope name is also a type error.

At runtime

Reintersect checks scopes on every API request. A request without the scope fails with 403 and ReintersectAppScopeMissingError:
You normally see this only when an install is still on an older version that granted fewer scopes. Installs keep the scopes their admin approved until the admin approves a version that asks for more. See Publishing new versions.