storefrontAccessTokenCreate mutation always returns "Access Denied"

ssagli
New Member
4 0 0

Have you received any answer from the support team? I am having the same issue where I have all of the unauthenticated scopes listed, mode is on offline and access token passed in.

0 Likes
_JB
Shopify Staff
Shopify Staff
822 97 178

Hey @yakpak_rahulm,

Thanks for outlining how you solved it.

@yakpak_rahulm and @ssagli can you confirm if you're seeing the redirect to /auth while using an HTTP client like Postman or Insomia? If so this is likely related to cookies being sent with the request. Deleting the cookies from your client and resending the request should fix it. If that doesn't explain it, please record the X-Request-ID value from the response header of your call, and I'll check the logs for more details.

JB | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
yakpak_rahulm
Tourist
13 0 1

Hi @_JB,

I'm seeing the redirect to /auth directly in the Shopify app. I'm also using tokens to authorize (not cookies), so I don't think that's the cause. However, I solved this issue by requesting and online AND offline token, and using the online token for API calls from my Shopify app.

 

Best,
Rahul

0 Likes
ssagli
New Member
4 0 0

I was trying to request access from my frontend thinking that I could when it should have been from my backend. Thank you so much for your help!

0 Likes