Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: CheckoutCreate access denied - Generated storefront_access_token with all unauthenticated permissions #871

Open
bicced opened this issue Aug 13, 2024 · 0 comments

Comments

@bicced
Copy link

bicced commented Aug 13, 2024

Hello,

I'm encountering an issue when attempting to add items to the cart through the UI using the Storefront API. Here's the error message I'm receiving:

Error: [{"message":"CheckoutCreate access denied","path":["checkoutCreate"],"locations":[],"extensions":{"code":"ACCESS_DENIED","documentation":"https://shopify.dev/api/usage/access-scopes"}}]

Details:

Context:
The "Add to Cart" functionality works perfectly when I install the Buy Button Channel app, and copy over the provided storefrontAccessToken it provides. However, when I try to use a generated storefront_access_token with all unauthenticated permissions enabled, I receive the above error.

Expected Behavior:
I expect to be able to add items to the cart using the Storefront API with the generated storefront_access_token.

Actual Behavior:
The operation fails with an ACCESS_DENIED error when using the generated token.

Steps to Reproduce:

  1. Generate a storefront_access_token using Admin Rest API

  2. Implement buy-button-js to app

  3. When adding to cart, nothing shows up and we can see ACCESS_DENIED "CheckoutCreate access denied" error in logs. Same thing happens when going directly to checkout without cart - a popup opens with blank contents and produces the same error above.

Question:
Is there a configuration or permission setting that I'm missing?
How can I resolve this issue and successfully add items to the cart using the generated storefront_access_token?

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant