Scopes
Contains functions used to manage scopes for your app.
This object is returned on authenticated Admin requests.
Anchor to scopesscopes
Provides utilities that apps can use to manage scopes for the app using the Admin API.
- Anchor to queryqueryquery() => Promise<ScopesDetail>() => Promise<ScopesDetail>requiredrequired
Queries Shopify to see what scopes have been granted
- Anchor to requestrequestrequest(scopes: string[]) => Promise<void>(scopes: string[]) => Promise<void>requiredrequired
Requests the merchant grant the provided scopes
This method performs a redirect to the grant screen.
- Anchor to revokerevokerevoke(scopes: string[]) => Promise<ScopesRevokeResponse>(scopes: string[]) => Promise<ScopesRevokeResponse>requiredrequired
Revokes the provided scopes
Warning: This method throws an error if the provided optional scopes contains a required scope.
ScopesDetail
- granted
The scopes that have been granted on the shop for this app
string[] - optional
The optional scopes that the app has declared in its configuration
string[] - required
The required scopes that the app has declared in its configuration
string[]
ScopesRevokeResponse
- revoked
The scopes that have been revoked on the shop for this app
string[]
Was this page helpful?