Am trying to create a private app for a client, but can not add items to the cart. Am able to create the cart, but it throws a permission error when I try to add items. uncaught exception: AppBridgeError: APP::ERROR::PERMISSION
Solved! Go to the solution
This is an accepted solution.
Hi @kmsoni
Your app may miss read_orders or write_orders permission. You can rebuild auth url and add one of them in scope. https://help.shopify.com/en/api/getting-started/authentication/oauth#step-2-ask-for-permission
Also, cart action can only be accessed via cart pos link. You will see permission error when request cart from apps list.
I hope it helps.
Hi @kmsoni ,
In order to create POS link, you access to Manage embedded POS app https://help.shopify.com/en/api/embedded-apps/app-extensions/shopify-pos/embed-in-shopify-pos. You will find POS link there. When creating new link, you need to select "Edit cart" in "Page to show link" dropdown menu.
> Does it mean I only have to access the App from the POS app?
I am not quite sure what you mean for this question. However, you can only have access to Cart in Point of Sale app. If you build app that work for Shopify Mobile and Point of Sale, you can use feature detection to detect if cart feature is available https://help.shopify.com/en/api/embedded-apps/app-bridge/actions/cart#requirements
Thanks,
Henry
Thanks for the help so far, with your pointers I was able to do much of the work. Now am stuck at the point of adding inventory items to the cart as line items. I am able to add hard-coded items, however I need to add items from the inventory on being selected from a resource picker. Two questions;
Hi @kmsoni ,
App Bridge Resource Picker support filtering with `initialQuery` https://help.shopify.com/en/api/embedded-apps/app-bridge/actions/resourcepicker#options. You can use search syntax to limit the number of items https://help.shopify.com/en/api/getting-started/search-syntax.
Both product and productVariant pickers can return variants, unless you specify `showVariants` false. You can also set it to true and see.
Thanks,
Henry
User | Count |
---|---|
28 | |
7 | |
7 | |
6 | |
5 |