App reviews, troubleshooting, and recommendations
Hi,
I am facing an issue with my Shopify app where I receive a 400 Bad Request when the app is uninstalled from a store. I need help troubleshooting this problem.
Upon installation of the app, I can observe the following message in the console:
[shopify-api/WARNING] API Deprecation Notice 7/11/2023, 11:45:07 AM: {"message":"https://shopify.dev/api/usage/versioning#deprecation-practices","path":"https://store.myshopify.com/admin/api/2023-04/graphql.json","body":"{\n webhookSubscriptions(\n first: 250,\n after: null,\n ){\n edges {\n node {\n id..."} - Stack Trace: Error
When I check the subscribed webhooks of my store, I find that the "App_uninstalled" topic is subscribed with the callback URL as http://{url}/api/webhooks.
Upon investigating the node modules where the error is logged from, I noticed a variable called "deprecationReason".
However, when I log its value using console.log, it gives me "undefined".
Here is the code snippet where the "deprecationReason" is assigned:
deprecationReason = (0, http_1.getHeader)(response.headers, 'X-Shopify-API-Deprecated-Reason');
console.log("deprecationReason", deprecationReason); // Output: (deprecationReason undefined)
I even tried to make some api's in my node main file so that incase webhooks tries to hit the endpoint /api/webhooks it gets a 200 response.
app.post("/api/test",(req,res)=>{
res.status(200).send("OK");
});
app.post("/api/webhooks", (req, res) => { res.status(200).send("OK"); });
I would greatly appreciate any insights, guidance, or suggestions to resolve this issue.
Thank you in advance!
The API deprecation message is simply a warning that the API version you are currently using will be deprecated soon. You need to update to the latest API version (2023-07 at the time of this message) to eliminate this warning. To execute this update, navigate to your app setup configuration on partners.shopify.com. Additionally, ensure that your code is using the latest API version.
Regarding the proper registration of webhooks, I recommend updating to the most recent version of the Shopify API and following the webhooks guide available on their GitHub repository. Here is the repository link: https://github.com/Shopify/shopify-api-js
Learn what's possible with customizing Shopify Checkout beyond what's available out of...
By Shopify Feb 19, 20252m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025