-
-
Notifications
You must be signed in to change notification settings - Fork 313
Store Front Access Tokens
Joshua Harms edited this page Dec 20, 2023
·
1 revision
You can use the StorefrontAccessToken resource to generate storefront access tokens. Storefront access tokens are used to delegate unauthenticated access scopes to clients that need to access the unautheticated Storefront API. A sales channel can generate a storefront access token and then pass it to a consuming client, such as JavaScript or a mobile application.
There is a hard limit of 100 tokens per Shopify store.
To create a StorefrontAccessToken, you must pass in a title for the token. There are no constraints on the uniqueness of the title.
var service = new StorefrontAccessTokenService(myShopifyUrl, shopAccessToken);
var token = await service.CreateAsync("My storefront access token");
var service = new StorefrontAccessTokenService(myShopifyUrl, shopAccessToken);
await service.DeleteAsync(storefrontAccessTokenId);
This endpoint is not paginated, because there is a limit of only 100 storefront access tokens per shop.
var service = new StorefrontAccessTokenService(myShopifyUrl, shopAccessToken);
var list = await service.ListAsync();