Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello,
I recently started to play around with store fronts api to get some information on my store and my brothers store. My brothers api calling was working fine until yesterday when I tried accessing it I got "access denied." Has shopify changed its API's and Endpoints? I don't see anything on the change log. I would appreciate some help. It was working so well. Thank you
Hi, are you sure you or someone else have not changed the access scopes?
Storefront API definitely has not stopped working (which you can always check here) and there were no changes made recently that would affect the Storefront API in ways you describe. I can only guess that it must be something in the way you are calling the API or how your specific stores are configured for API use, but cannot tell what because you haven't provided many details either how your store's private app Storefront API access is configured or how you are querying the storefront i.e. what you're attempting to do.
Apart from Storefront API there are no public APIs to access store public data in such depth as is with the API. You can use AJAX API for the cart, you can use some of the theme's JS/JSON endpoints, but that's just about it.
I try and call my websites Store Front API and it says ACCESS DENIED. I have not changed anything meaning I did not change the access scopes. I have no idea what is going on. Myself along with others have had this problem and it began yesterday.
Ok so shopify did change something with the store-front api I guess Ill need to do a quick fix. I have two questions.
Can we get products sorted by updated_date from products.json?
What happens when a website (like mine) doesn't give you access to the products.json page? Being shopify it has to have one, but how would I get it? Like my brothers site supports products.json but I cannot find a url, so my question is there any other way to find the products.json page even though it may appear "blocked" in a way.
Yeah, I saw the other thread where they did confirm some changes that weren't announced 😒 I guess the changelog page still isn't fully utilised within Shopify as it has only been added recently - something I hope will improve in time.
I am not aware of a way to sort the products.json endpoint on a store. You can page it, but that's just about it. Sorting would need to be done client side.
I don't know the specifics of the change, but it appears to me it had something to do with public storefront access tokens being used to scrape stores.
As for products.json and paging I meant
/products.json?page=1
etc.
As Alex had mentioned in one of his posts in this thread, the Storefront API still works as it used to. It is only blocked when used with the public access token that people were using for unintended purposes - primarily to build bots to scoop up limited inventory sales to resell them at higher prices.
If you're really working on your own store and your brother's store as well, then you can still access them by properly generating an access token attached to an app using the steps outlined in this documentation.
Josh | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog