Ad
Registering A Shopify Webhook Via The ShopifyAPI Gem
This call correctly returns an empty array:
hooks = ShopifyAPI::Session.temp(s.myshopify_domain, s.shopify_access_token) do
ShopifyAPI::Webhook.find :all
end
While this call always returns a 403:
hook = ShopifyAPI::Session.temp(s.myshopify_domain, s.shopify_access_token) do
ShopifyAPI::Webhook.create(
format: 'json',
topic: 'orders/fulfilled',
address: "http://www.something.fr/api/webhooks?store_id=#{s.id }&store_check=#{ s.checksum }"
)
end
I've tried pretty much all solutions offered over various websites, each time with a failure.
What am I missing here?
Ad
Answer
The whole code block given in original post is correct. It was in fact a rights problem, the customer who provided us with the API tokens didn't enable webhook creation rights on the Shopify configuration.
It might seem like nothing, but it is critical that you check that with whoever gave you credentials!
Ad
source: stackoverflow.com
Related Questions
- → Issues installing composer correctly on OS X El Capitan
- → ListView.DataSource looping data for React Native
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Getting Comments of comments Facebook API
- → Browserify api: how to pass advanced option to script
- → Laravel - input request handling for global pagination
- → Redux: Using async middlewares vs dispatching actions on success functions
- → Facebook Developer API in reactjs code
- → Multiple Components Using One Store
- → Good solution to work with rest-api like SPA with redux?
- → Facebook PHP SDK - Graph Error "Authorization code has been used" on page refresh
- → Status of AudioWorkerNode in Web Audio API
- → CORS missmatch because of http
Ad