0
votes

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);
1

1 Answers

3
votes

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:

  1. A public shopify app
  2. Enabled sales channel (You can find it in Apps->your app->app setup)
  3. 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.