--- title: Scopes description: |- Contains functions used to manage scopes for your app. This object is returned on authenticated Admin requests. api_version: v1 latest api_name: shopify-app-react-router source_url: html: 'https://shopify.dev/docs/api/shopify-app-react-router/latest/apis/scopes' md: 'https://shopify.dev/docs/api/shopify-app-react-router/latest/apis/scopes.md' --- # Scopesobject Contains functions used to manage scopes for your app. This object is returned on authenticated Admin requests. ## scopes Provides utilities that apps can use to [manage scopes](https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/manage-access-scopes) for the app using the Admin API. * query () => Promise\ required Queries Shopify for the scopes for this app on this shop * request (scopes: string\[]) => Promise\ required Requests the merchant to grant the provided scopes for this app on this shop Warning: This method performs a server-side redirect. * revoke (scopes: string\[]) => Promise\ required Revokes the provided scopes from this app on this shop Warning: This method throws an [error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AppRevokeAccessScopesAppRevokeScopeError) if the provided optional scopes contains a required scope. ### ScopesDetail * granted The scopes that have been granted on the shop for this app ```ts string[] ``` * optional The optional scopes that the app has declared in its configuration ```ts string[] ``` * required The required scopes that the app has declared in its configuration ```ts string[] ``` ```ts export interface ScopesDetail { /** * The scopes that have been granted on the shop for this app */ granted: Scope[]; /** * The required scopes that the app has declared in its configuration */ required: Scope[]; /** * The optional scopes that the app has declared in its configuration */ optional: Scope[]; } ``` ### ScopesRevokeResponse * revoked The scopes that have been revoked on the shop for this app ```ts string[] ``` ```ts export interface ScopesRevokeResponse { /** * The scopes that have been revoked on the shop for this app */ revoked: Scope[]; } ``` ## Examples ### query ### request ### revoke ## Related [Authenticate requests from Shopify Admin. - Admin context](https://shopify.dev/docs/api/shopify-app-react-router/authenticate/admin)