Access denied via storefront API

wincop518
Tourist
25 0 3

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

Replies 10 (10)

KarlOffenberger
Shopify Partner
1873 184 900

Hi, are you sure you or someone else have not changed the access scopes?

wincop518
Tourist
25 0 3
Well it worked with graphql until recently around like 4:30ish, I’m getting access denied. It appears that the graphql doesn’t work anymore or you need permission to do it now. I tried it on other stores as well the same thing happened.
wincop518
Tourist
25 0 3
Instead of the graphql endpoint, what other Public api can I call to get the information I need?
KarlOffenberger
Shopify Partner
1873 184 900

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.

wincop518
Tourist
25 0 3

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.

wincop518
Tourist
25 0 3

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. 

KarlOffenberger
Shopify Partner
1873 184 900

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.

wincop518
Tourist
25 0 3
Can you specify? What do you mean page it? I really wish shopify didn’t change the graphql I just got it working 😓.
KarlOffenberger
Shopify Partner
1873 184 900

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.

Josh
Shopify Staff
1134 84 233

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