Skip to content

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

@bicced

Description

@bicced

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions