123456789101112131415161718192021 |
- // import {createStorefrontApiClient} from '@shopify/storefront-api-client';
-
- // const client = createStorefrontApiClient({
- // storeDomain: 'http://amberdevstore.myshopify.com',
- // apiVersion: '2024-10',
- // publicAccessToken: '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',
- // });
-
- const adminApiClient = new shopify.clients.Rest({session});
- const storefrontTokenResponse = await adminApiClient.post({
- path: 'storefront_access_tokens',
- type: DataType.JSON,
- data: {
- storefront_access_token: {
- title: 'This is my test access token',
- },
- },
- });
-
- const storefrontAccessToken =
- storefrontTokenResponse.body['b3e24842a76e27e1d87206daededdab0']['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'];
|