Issue
I am using https://github.com/osiset/laravel-shopify package to manage Shopify API with laravel 8 and facing the following error:
HTTP/1.1 403 Forbidden { "errors": "App must be extendable to create a storefront access token." }
Trying the following:
$shop = Auth::user();
$orders = $shop->api()->rest('POST', '/admin/api/2021-01/storefront_access_tokens.json', ['storefront_access_token' => ['title' => 'mobile']]);
dd($orders);
Solution
I want to answer my own question as eventually i was able to found the soluion: To achive this you must have the following requirements:
- A public shopify app
- Enabled sales channel (You can find it in Apps->your app->app setup)
- Api scopes with following values:
read_products,write_products,unauthenticated_read_content,unauthenticated_read_customer_tags,unauthenticated_read_product_tags,unauthenticated_read_product_listings,unauthenticated_write_checkouts,unauthenticated_read_checkouts,unauthenticated_write_customers,unauthenticated_read_customers
and the you need to logout(if already logged in) and then re-authenticate with shopify and then You will be able to make it work.
Answered By - MR_AMDEV Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.