Focuses on API authentication, access scopes, and permission management.
I am trying generate a checkout link through the store front API and I am getting the following access error:
GraphqlQueryError: CheckoutCreate access denied 2023-07-23 19:11:13 │ web-backend │ at NewStorefrontClient.<anonymous> (/Users/mpmadmin/shopify/build-a-bundle/node_modules/@shopify/shopify-api/lib/clients/graphql/graphql_client.js:52:23) 2023-07-23 19:11:13 │ web-backend │ at Generator.next (<anonymous>) 2023-07-23 19:11:13 │ web-backend │ at fulfilled (/Users/mpmadmin/shopify/build-a-bundle/node_modules/tslib/tslib.js:166:62) 2023-07-23 19:11:13 │ web-backend │ at processTicksAndRejections (node:internal/process/task_queues:96:5) { 2023-07-23 19:11:13 │ web-backend │ response: { data: { checkoutCreate: null }, errors: [ [Object] ] },
I have the following scopes setup and accepted in my app / store.
scopes = "unauthenticated_read_selling_plans,unauthenticated_read_product_tags,unauthenticated_write_customers,unauthenticated_read_customer_tags,unauthenticated_read_product_listings,write_products,read_discounts,read_metaobjects,read_metaobject_definitions,write_metaobjects,write_metaobject_definitions,unauthenticated_write_checkouts,unauthenticated_read_metaobjects,write_checkouts"
Solved! Go to the solution
This is an accepted solution.
Hi SBD_
After sometime I found that what I was trying to do was not the best way of going about it. I really didnt need to create a custom checkout (although the api docs did seem like that was the solution to go with). All I needed to do was simply hit the /cart endpoint with the variant ids and quantity in the url and discount if needed.
This is an accepted solution.
Hi SBD_
After sometime I found that what I was trying to do was not the best way of going about it. I really didnt need to create a custom checkout (although the api docs did seem like that was the solution to go with). All I needed to do was simply hit the /cart endpoint with the variant ids and quantity in the url and discount if needed.
Glad to hear it!
Scott | Developer Advocate @ Shopify