Unable to get Webhook based on domain and Unable to call Shopify API's based on store_name

Unable to get Webhook based on domain and Unable to call Shopify API's based on store_name

Faateh
Shopify Partner
17 0 0

Basic Scenario is that I created a Shopify App in which I used to get Shop Details using GraphQl API
Response: 

"shop": {
      "name": "Qa_Testingd",
      "email": "xyz@gmail.com",
      "id": "gid://shopify/Shop/1",
      "myshopifyDomain": "qa-testingd.myshopify.com",
      "url": "https://qa-testingd.myshopify.com"
    }

Now based on this response I used to identify from which store this webhook is recieved and based on the name in shop resource, I used to call Shopify API's but it is not working


According to following resolved issue
https://community.shopify.com/c/webhooks-and-events/in-webhook-order-create-how-do-we-identify-from-...

X-Shopify-Topic: orders/create
X-Shopify-Hmac-Sha256: XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
X-Shopify-Shop-Domain: johns-apparel.myshopify.com
X-Shopify-API-Version: 2019-04


I check that if the myShopifyDomain from the shop resource and domain from the webhook headers is equal then do something.

 

My question regarding this is that customers can have their own custom domains, then the domain which is coming from webhook headers, will it be equal to the domain that is myShopifyDomain in shop?

And the Shopify API's based on shop name resource is not working. It gives Not Found Error.
Kindly guide me. Thank you in advance



Replies 0 (0)