Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
so in the shopify docs its saying that we can subscribe to webhook using app configuration file (toml) or using the API in the shopify.server file.
so in the toml file there is already an webhook for app uninstalled config like this
[webhooks]
api_version = "2024-07"
[[webhooks.subscriptions]]
topics = [ "app/uninstalled" ]
uri = "/webhooks"
if I uninstall my app nothing is happening in the webhooks routes
but if I add in the shopify server file like this its working dont know why ?
const shopify = shopifyApp({
apiKey: process.env.SHOPIFY_API_KEY,
apiSecretKey: process.env.SHOPIFY_API_SECRET || "",
apiVersion: ApiVersion.July24,
scopes: process.env.SCOPES?.split(","),
appUrl: process.env.SHOPIFY_APP_URL || "",
authPathPrefix: "/auth",
sessionStorage: new MongoDBSessionStorage(process.env.mongodb_url),
distribution: AppDistribution.AppStore,
restResources,
future: {
unstable_newEmbeddedAuthStrategy: true,
},
...(process.env.SHOP_CUSTOM_DOMAIN
? { customShopDomains: [process.env.SHOP_CUSTOM_DOMAIN] }
: {}),
webhooks: {
APP_UNINSTALLED: {
deliveryMethod: DeliveryMethod.Http,
callbackUrl: "/webhooks",
},
},
hooks: {
afterAuth: async ({ session }) => {
shopify.registerWebhooks({ session });
},
},
});
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024