Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(shopify): add Dev Dashboard client-credentials auth alongside Admin Token (#15755)

Odai Ahmad6c6c85274e0d
diff --git a/bun.lock b/bun.lock
index 951bd746010..832ab0ebd9e 100644
--- a/bun.lock
+++ b/bun.lock
@@ -8235,7 +8235,7 @@
},
"packages/pieces/community/shopify": {
"name": "@activepieces/piece-shopify",
- "version": "0.3.0",
+ "version": "0.4.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/shopify/package.json b/packages/pieces/community/shopify/package.json
index 1307aae42dd..7959b8618a3 100644
--- a/packages/pieces/community/shopify/package.json
+++ b/packages/pieces/community/shopify/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-shopify",
- "version": "0.3.0",
+ "version": "0.4.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/shopify/src/i18n/translation.json b/packages/pieces/community/shopify/src/i18n/translation.json
index 1dcdff11c7f..2156732622c 100644
--- a/packages/pieces/community/shopify/src/i18n/translation.json
+++ b/packages/pieces/community/shopify/src/i18n/translation.json
@@ -2,7 +2,6 @@
"Ecommerce platform for online stores": "Ecommerce platform for online stores",
"Shop Name": "Shop Name",
"Admin Token": "Admin Token",
- "\n**Shop Name**:\n\nYou can find your shop name in the url For example, if the URL is `https://example.myshopify.com/admin`, then your shop name is **example**.\n\n**Admin Token**:\n\n1. Login to your Shopify account\n2. Go to Settings -> Apps\n3. Click on Develop apps\n4. Create an App\n5. Fill the app name\n6. Click on Configure Admin API Scopes (Select the following scopes 'read_orders', 'write_orders', 'write_customers', 'read_customers', 'write_products', 'read_products', 'write_draft_orders', 'read_draft_orders')": "\n**Shop Name**:\n\nYou can find your shop name in the url For example, if the URL is `https://example.myshopify.com/admin`, then your shop name is **example**.\n\n**Admin Token**:\n\n1. Login to your Shopify account\n2. Go to Settings -> Apps\n3. Click on Develop apps\n4. Create an App\n5. Fill the app name\n6. Click on Configure Admin API Scopes (Select the following scopes 'read_orders', 'write_orders', 'write_customers', 'read_customers', 'write_products', 'read_products', 'write_draft_orders', 'read_draft_orders')\n7. Click on Install app\n8. Copy the Admin Access Token\n",
"Adjust Inventory Level": "Adjust Inventory Level",
"Cancel Order": "Cancel Order",
"Close Order": "Close Order",
@@ -157,5 +156,10 @@
"Triggered when a new customer is created": "Triggered when a new customer is created",
"Triggered when a new order is created": "Triggered when a new order is created",
"Triggered when a product is updated.": "Triggered when a product is updated.",
- "Triggered when a paid order is created": "Triggered when a paid order is created"
+ "Triggered when a paid order is created": "Triggered when a paid order is created",
+ "\nUse this option for custom apps created in the Shopify admin **before January 1, 2026**. Shopify no longer lets you create these apps, but existing ones keep working and their Admin API access token does not expire. For a new app, choose the **Dev Dashboard app** option instead.\n\n**Shop Name**:\n\nYou can find your shop name in the URL. For example, if the URL is `https://example.myshopify.com/admin`, then your shop name is **example**.\n\n**Admin Token**:\n\n1. Log in to your Shopify admin.\n2. Go to **Settings*": "\nUse this option for custom apps created in the Shopify admin **before January 1, 2026**. Shopify no longer lets you create these apps, but existing ones keep working and their Admin API access token does not expire. For a new app, choose the **Dev Dashboard app** option instead.\n\n**Shop Name**:\n\nYou can find your shop name in the URL. For example, if the URL is `https://example.myshopify.com/admin`, then your shop name is **example**.\n\n**Admin Token**:\n\n1. Log in to your Shopify admin.\n2. Go to **Settings** -> **Apps and sales channels** -> **Develop apps**.\n3. Open your existing custom app.\n4. Under **Configuration**, check that the Admin API scopes include: `read_orders`, `write_orders`, `read_customers`, `write_customers`, `read_products`, `write_products`, `read_draft_orders`, `write_draft_orders`, `read_locations`, `read_inventory`, `write_inventory`, `read_themes`, `write_fulfillments`.\n5. Under **API credentials**, copy the **Admin API access token**.\n",
+ "Admin Token (legacy custom app)": "Admin Token (legacy custom app)",
+ "The part before .myshopify.com in your store URL. For https://example.myshopify.com, enter example.": "The part before .myshopify.com in your store URL. For https://example.myshopify.com, enter example.",
+ "\nUse this option for apps created in the Shopify **Dev Dashboard** (all new apps from January 1, 2026). Activepieces exchanges the app's client ID and client secret for an access token and renews it automatically every 24 hours.\n\n**Important:** the app and the store must belong to the **same Shopify organization**, otherwise Shopify rejects the connection.\n\n1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard) and click **Create app**. Give it a name.\n2. Create a version of the app and, un": "\nUse this option for apps created in the Shopify **Dev Dashboard** (all new apps from January 1, 2026). Activepieces exchanges the app's client ID and client secret for an access token and renews it automatically every 24 hours.\n\n**Important:** the app and the store must belong to the **same Shopify organization**, otherwise Shopify rejects the connection.\n\n1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard) and click **Create app**. Give it a name.\n2. Create a version of the app and, under **Access** -> **Scopes**, select these Admin API scopes: `read_orders`, `write_orders`, `read_customers`, `write_customers`, `read_products`, `write_products`, `read_draft_orders`, `write_draft_orders`, `read_locations`, `read_inventory`, `write_inventory`, `read_themes`, `write_fulfillments`.\n3. Release a version with these scopes and install/approve it on the store: from the app's **Home** page, click **Install app** and install it on your store (reinstall it if it was installed before the scopes were added). The store must be in the same organization as the app.\n4. Open the app's **Settings** page and copy the **Client ID** and **Client secret**.\n5. Enter your shop name below (for `https://example.myshopify.com`, enter **example**), then paste the client ID and client secret.\n\n**Note:** If you change the app's scopes later, reconnect this connection so a new token is issued (tokens keep the scopes they were issued with for up to 24 hours).\n",
+ "Dev Dashboard app": "Dev Dashboard app"
}
\ No newline at end of file
diff --git a/packages/pieces/community/shopify/src/index.ts b/packages/pieces/community/shopify/src/index.ts
index 4616ae030be..1353e3b91f6 100644
--- a/packages/pieces/community/shopify/src/index.ts
+++ b/packages/pieces/community/shopify/src/index.ts
@@ -1,13 +1,5 @@
-import {
- HttpMethod,
- createCustomApiCallAction,
-} from '@activepieces/pieces-common';
-import {
- PieceAuth,
- Property,
- createPiece,
-} from '@activepieces/pieces-framework';
-import { AppConnectionType, PieceCategory } from '@activepieces/pieces-framework';
+import { createCustomApiCallAction } from '@activepieces/pieces-common';
+import { createPiece, PieceCategory } from '@activepieces/pieces-framework';
import { adjustInventoryLevelAction } from './lib/actions/adjust-inventory-level';
import { cancelOrderAction } from './lib/actions/cancel-order';
import { closeOrderAction } from './lib/actions/close-order';
@@ -34,7 +26,7 @@ import { updateCustomerAction } from './lib/actions/update-customer';
import { updateOrderAction } from './lib/actions/update-order';
import { updateProductAction } from './lib/actions/update-product';
import { uploadProductImageAction } from './lib/actions/upload-product-image';
-import { getBaseUrl, sendShopifyRequest } from './lib/common';
+import { shopifyAuth, shopifyAuthHelpers } from './lib/common/auth';
import { newAbandonedCheckout } from './lib/triggers/new-abandoned-checkout';
import { newCancelledOrder } from './lib/triggers/new-cancelled-order';
import { newCustomer } from './lib/triggers/new-customer';
@@ -42,57 +34,7 @@ import { newOrder } from './lib/triggers/new-order';
import { newPaidOrder } from './lib/triggers/new-paid-order';
import { updatedProduct } from './lib/triggers/updated-product';
-const markdown = `
-**Shop Name**:
-
-You can find your shop name in the url For example, if the URL is \`https://example.myshopify.com/admin\`, then your shop name is **example**.
-
-**Admin Token**:
-
-1. Login to your Shopify account
-2. Go to Settings -> Apps
-3. Click on Develop apps
-4. Create an App
-5. Fill the app name
-6. Click on Configure Admin API Scopes (Select the following scopes 'read_orders', 'write_orders', 'write_customers', 'read_customers', 'write_products', 'read_products', 'write_draft_orders', 'read_draft_orders')
-7. Click on Install app
-8. Copy the Admin Access Token
-`;
-
-export const shopifyAuth = PieceAuth.CustomAuth({
- description: markdown,
- required: true,
- props: {
- shopName: Property.ShortText({
- displayName: 'Shop Name',
- required: true,
- }),
- adminToken: PieceAuth.SecretText({
- displayName: 'Admin Token',
- required: true,
- }),
- },
- validate: async ({ auth }) => {
- try {
- await sendShopifyRequest({
- auth: {
- type: AppConnectionType.CUSTOM_AUTH,
- props: auth,
- },
- method: HttpMethod.GET,
- url: '/shop.json',
- });
- return {
- valid: true,
- };
- } catch (e) {
- return {
- valid: false,
- error: 'Invalid Shop Name or Admin Token',
- };
- }
- },
-});
+export { shopifyAuth };
export const shopify = createPiece({
displayName: 'Shopify',
@@ -100,7 +42,7 @@ export const shopify = createPiece({
logoUrl: 'https://cdn.activepieces.com/pieces/shopify.png',
authors: ["kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","ikus060"],
categories: [PieceCategory.COMMERCE],
- minimumSupportedRelease: '0.30.0',
+ minimumSupportedRelease: '0.87.0',
auth: shopifyAuth,
actions: [
adjustInventoryLevelAction,
@@ -131,15 +73,10 @@ export const shopify = createPiece({
uploadProductImageAction,
createCustomApiCallAction({
baseUrl: (auth) => {
- return auth ? getBaseUrl(auth.props.shopName) : '';
+ return auth ? shopifyAuthHelpers.getBaseUrl(auth) : '';
},
auth: shopifyAuth,
- authMapping: async (auth) => {
- const typedAuth = auth.props.adminToken;
- return {
- 'X-Shopify-Access-Token': typedAuth,
- };
- },
+ authMapping: async (auth) => shopifyAuthHelpers.getAuthHeaders(auth),
}),
],
triggers: [
diff --git a/packages/pieces/community/shopify/src/lib/common/auth.ts b/packages/pieces/community/shopify/src/lib/common/auth.ts
new file mode 100644
index 00000000000..bcfbbd2d17d
--- /dev/null
+++ b/packages/pieces/community/shopify/src/lib/common/auth.ts
@@ -0,0 +1,197 @@
+import {
+ HttpError,
+ HttpMethod,
+ httpClient,
+} from '@activepieces/pieces-common';
+import {
+ AppConnectionType,
+ AppConnectionValueForAuthProperty,
+ OAuth2GrantType,
+ PieceAuth,
+ Property,
+} from '@activepieces/pieces-framework';
+
+const adminTokenMarkdown = `
+Use this option for custom apps created in the Shopify admin **before January 1, 2026**. Shopify no longer lets you create these apps, but existing ones keep working and their Admin API access token does not expire. For a new app, choose the **Dev Dashboard app** option instead.
+
+**Shop Name**:
+
+You can find your shop name in the URL. For example, if the URL is \`https://example.myshopify.com/admin\`, then your shop name is **example**.
+
+**Admin Token**:
+
+1. Log in to your Shopify admin.
+2. Go to **Settings** -> **Apps and sales channels** -> **Develop apps**.
+3. Open your existing custom app.
+4. Under **Configuration**, check that the Admin API scopes include: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`.
+5. Under **API credentials**, copy the **Admin API access token**.
+`;
+
+const devDashboardMarkdown = `
+Use this option for apps created in the Shopify **Dev Dashboard** (all new apps from January 1, 2026). Activepieces exchanges the app's client ID and client secret for an access token and renews it automatically every 24 hours.
+
+**Important:** the app and the store must belong to the **same Shopify organization**, otherwise Shopify rejects the connection.
+
+1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard) and click **Create app**. Give it a name.
+2. Create a version of the app and, under **Access** -> **Scopes**, select these Admin API scopes: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`.
+3. Release a version with these scopes and install/approve it on the store: from the app's **Home** page, click **Install app** and install it on your store (reinstall it if it was installed before the scopes were added). The store must be in the same organization as the app.
+4. Open the app's **Settings** page and copy the **Client ID** and **Client secret**.
+5. Enter your shop name below (for \`https://example.myshopify.com\`, enter **example**), then paste the client ID and client secret.
+
+**Note:** If you change the app's scopes later, reconnect this connection so a new token is issued (tokens keep the scopes they were issued with for up to 24 hours).
+`;
+
+const NO_APPROVED_SCOPES_ERROR =
+ 'Your Shopify app has no approved Admin API scopes on this store. In the Dev Dashboard, release an app version that includes the scopes, then install/approve it on the store (reinstall if needed), and try again.';
+
+const SHOP_NAME_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9-]*$/;
+
+const INVALID_SHOP_NAME_ERROR =
+ 'Invalid Shop Name. Enter only the part before .myshopify.com in your store URL (letters, numbers and hyphens), for example "example" for https://example.myshopify.com.';
+
+export function getBaseUrl(shopName: string) {
+ if (!isValidShopName(shopName)) {
+ throw new Error(INVALID_SHOP_NAME_ERROR);
+ }
+ return `https://${shopName}.myshopify.com/admin/api/2023-10`;
+}
+
+export const shopifyAdminTokenAuth = PieceAuth.CustomAuth({
+ displayName: 'Admin Token (legacy custom app)',
+ description: adminTokenMarkdown,
+ required: true,
+ props: {
+ shopName: Property.ShortText({
+ displayName: 'Shop Name',
+ required: true,
+ }),
+ adminToken: PieceAuth.SecretText({
+ displayName: 'Admin Token',
+ required: true,
+ }),
+ },
+ validate: async ({ auth }) => {
+ if (!isValidShopName(auth.shopName)) {
+ return { valid: false, error: INVALID_SHOP_NAME_ERROR };
+ }
+ try {
+ await httpClient.sendRequest({
+ url: `${getBaseUrl(auth.shopName)}/shop.json`,
+ method: HttpMethod.GET,
+ headers: {
+ 'X-Shopify-Access-Token': auth.adminToken,
+ },
+ });
+ return {
+ valid: true,
+ };
+ } catch (e) {
+ return {
+ valid: false,
+ error: 'Invalid Shop Name or Admin Token',
+ };
+ }
+ },
+});
+
+export const shopifyDevDashboardAuth = PieceAuth.OAuth2({
+ displayName: 'Dev Dashboard app',
+ description: devDashboardMarkdown,
+ required: true,
+ grantType: OAuth2GrantType.CLIENT_CREDENTIALS,
+ authUrl: '',
+ tokenUrl: 'https://{shopName}.myshopify.com/admin/oauth/access_token',
+ scope: [],
+ props: {
+ shopName: Property.ShortText({
+ displayName: 'Shop Name',
+ description:
+ 'The part before .myshopify.com in your store URL. For https://example.myshopify.com, enter example.',
+ required: true,
+ }),
+ },
+ validate: async ({ auth }) => {
+ const shopName = auth.props?.['shopName'];
+ if (!isValidShopName(shopName)) {
+ return { valid: false, error: INVALID_SHOP_NAME_ERROR };
+ }
+ try {
+ const scopesResponse = await httpClient.sendRequest<{
+ access_scopes?: { handle: string }[];
+ }>({
+ url: `https://${shopName}.myshopify.com/admin/oauth/access_scopes.json`,
+ method: HttpMethod.GET,
+ headers: {
+ 'X-Shopify-Access-Token': auth.access_token,
+ },
+ });
+ const accessScopes = scopesResponse.body?.access_scopes;
+ if (!Array.isArray(accessScopes) || accessScopes.length === 0) {
+ return { valid: false, error: NO_APPROVED_SCOPES_ERROR };
+ }
+ await httpClient.sendRequest({
+ url: `${getBaseUrl(shopName)}/shop.json`,
+ method: HttpMethod.GET,
+ headers: {
+ 'X-Shopify-Access-Token': auth.access_token,
+ },
+ });
+ return { valid: true };
+ } catch (e) {
+ return {
+ valid: false,
+ error: devDashboardValidationError(
+ e instanceof HttpError ? e.response.status : undefined,
+ ),
+ };
+ }
+ },
+});
+
+export const shopifyAuth = [shopifyAdminTokenAuth, shopifyDevDashboardAuth];
+
+export const shopifyAuthHelpers = {
+ getShopName,
+ getAccessToken,
+ getBaseUrl: (auth: ShopifyAuth) => getBaseUrl(getShopName(auth)),
+ getAuthHeaders: (auth: ShopifyAuth) => ({
+ 'X-Shopify-Access-Token': getAccessToken(auth),
+ }),
+};
+
+function devDashboardValidationError(status: number | undefined): string {
+ switch (status) {
+ case 401:
+ return 'Shopify rejected the access token. Check that the app is installed on this store and that the store belongs to the same organization as the app.';
+ case 403:
+ return 'The app is missing required Admin API scopes. Add the scopes listed above to the app version, release it, and reinstall the app on the store.';
+ case 404:
+ return 'Store not found. Check the Shop Name (for https://example.myshopify.com, enter example).';
+ default:
+ return 'Could not connect to Shopify with this Dev Dashboard app. Check the Shop Name, client ID and client secret.';
+ }
+}
+
+function isValidShopName(value: unknown): value is string {
+ return typeof value === 'string' && SHOP_NAME_PATTERN.test(value);
+}
+
+function getShopName(auth: ShopifyAuth): string {
+ const shopName =
+ auth.type === AppConnectionType.CUSTOM_AUTH
+ ? auth.props.shopName
+ : auth.props?.['shopName'];
+ if (!isValidShopName(shopName)) {
+ throw new Error(INVALID_SHOP_NAME_ERROR);
+ }
+ return shopName;
+}
+
+function getAccessToken(auth: ShopifyAuth): string {
+ if (auth.type === AppConnectionType.CUSTOM_AUTH) {
+ return auth.props.adminToken;
+ }
+ return auth.access_token;
+}
+
+export type ShopifyAuth = AppConnectionValueForAuthProperty<typeof shopifyAuth>;
diff --git a/packages/pieces/community/shopify/src/lib/common/index.ts b/packages/pieces/community/shopify/src/lib/common/index.ts
index a1f908131f6..47fd4a46ae4 100644
--- a/packages/pieces/community/shopify/src/lib/common/index.ts
+++ b/packages/pieces/community/shopify/src/lib/common/index.ts
@@ -1,12 +1,13 @@
import {
+ HttpError,
HttpMessageBody,
HttpMethod,
HttpResponse,
QueryParams,
httpClient,
} from '@activepieces/pieces-common';
+import { ShopifyAuth, getBaseUrl, shopifyAuthHelpers } from './auth';
import {
- ShopifyAuth,
ShopifyCheckout,
ShopifyCollect,
ShopifyCustomer,
@@ -20,9 +21,7 @@ import {
ShopifyTransaction,
} from './types';
-export function getBaseUrl(shopName: string) {
- return `https://${shopName}.myshopify.com/admin/api/2023-10`;
-}
+export { getBaseUrl, shopifyAuthHelpers };
export function sendShopifyRequest(data: {
url: string;
@@ -31,15 +30,17 @@ export function sendShopifyRequest(data: {
queryParams?: QueryParams;
auth: ShopifyAuth;
}): Promise<HttpResponse<HttpMessageBody>> {
- return httpClient.sendRequest({
- url: `${getBaseUrl(data.auth.props.shopName)}${data.url}`,
- method: data.method,
- body: data.body,
- queryParams: data.queryParams,
- headers: {
- 'X-Shopify-Access-Token': data.auth.props.adminToken,
- },
- });
+ return httpClient
+ .sendRequest({
+ url: `${shopifyAuthHelpers.getBaseUrl(data.auth)}${data.url}`,
+ method: data.method,
+ body: data.body,
+ queryParams: data.queryParams,
+ headers: shopifyAuthHelpers.getAuthHeaders(data.auth),
+ })
+ .catch((error: unknown) => {
+ throw withMerchantApprovalHint(error);
+ });
}
export async function createCustomer(
@@ -524,3 +525,28 @@ export async function getAbandonedCheckouts(
return (response.body as { checkouts: ShopifyCheckout[] }).checkouts;
}
+
+function withMerchantApprovalHint(error: unknown): unknown {
+ if (!(error instanceof HttpError) || error.response.status !== 403) {
+ return error;
+ }
+ const body = error.response.body;
+ if (typeof body !== 'object' || body === null || !('errors' in body)) {
+ return error;
+ }
+ const errors = body.errors;
+ if (typeof errors !== 'string') {
+ return error;
+ }
+ const scope = errors.match(/requires merchant approval for (\S+) scope/)?.[1];
+ if (!scope) {
+ return error;
+ }
+ return new HttpError(error.request.body, {
+ status: 403,
+ responseBody: {
+ ...body,
+ errors: `${errors} — approve the ${scope} scope for your app on the store, then reconnect.`,
+ },
+ });
+}
diff --git a/packages/pieces/community/shopify/src/lib/common/register-webhook.ts b/packages/pieces/community/shopify/src/lib/common/register-webhook.ts
index 57c9dd325c5..a5de19a864e 100644
--- a/packages/pieces/community/shopify/src/lib/common/register-webhook.ts
+++ b/packages/pieces/community/shopify/src/lib/common/register-webhook.ts
@@ -4,7 +4,7 @@ import {
Trigger,
TriggerStrategy,
} from '@activepieces/pieces-framework';
-import { shopifyAuth } from '../..';
+import { shopifyAuth, shopifyAuthHelpers } from './auth';
export const createShopifyWebhookTrigger = ({
name,
@@ -31,7 +31,7 @@ export const createShopifyWebhookTrigger = ({
sampleData: sampleData,
type: TriggerStrategy.WEBHOOK,
async onEnable(context) {
- const shopName = context.auth.props.shopName;
+ const shopName = shopifyAuthHelpers.getShopName(context.auth);
const response = await httpClient.sendRequest<{
webhook: {
id: string;
@@ -39,9 +39,7 @@ export const createShopifyWebhookTrigger = ({
}>({
method: HttpMethod.POST,
url: `https://${shopName}.myshopify.com/admin/api/2023-01/webhooks.json`,
- headers: {
- 'X-Shopify-Access-Token': context.auth.props.adminToken,
- },
+ headers: shopifyAuthHelpers.getAuthHeaders(context.auth),
body: {
webhook: {
topic: topic,
@@ -55,7 +53,7 @@ export const createShopifyWebhookTrigger = ({
},
async onDisable(context) {
const webhookId = await context.store.get<string>(`shopify_webhook_id`);
- const shopName = context.auth.props.shopName;
+ const shopName = shopifyAuthHelpers.getShopName(context.auth);
await httpClient.sendRequest<{
webhook: {
id: string;
@@ -63,9 +61,7 @@ export const createShopifyWebhookTrigger = ({
}>({
method: HttpMethod.DELETE,
url: `https://${shopName}.myshopify.com/admin/api/2023-01/webhooks/${webhookId}.json`,
- headers: {
- 'X-Shopify-Access-Token': context.auth.props.adminToken,
- },
+ headers: shopifyAuthHelpers.getAuthHeaders(context.auth),
});
await context.store?.put(`shopify_webhook_id`, null);
},
diff --git a/packages/pieces/community/shopify/src/lib/common/types.ts b/packages/pieces/community/shopify/src/lib/common/types.ts
index 00791e7c8f3..09bc07a2e95 100644
--- a/packages/pieces/community/shopify/src/lib/common/types.ts
+++ b/packages/pieces/community/shopify/src/lib/common/types.ts
@@ -1,7 +1,4 @@
-import { AppConnectionValueForAuthProperty } from "@activepieces/pieces-framework";
-import { shopifyAuth } from "../..";
-
-export type ShopifyAuth = AppConnectionValueForAuthProperty<typeof shopifyAuth>;
+export type { ShopifyAuth } from './auth';
export type ShopifyCustomer = {
id: number;