我正在使用 https://github.com/osiset/laravel-shopify 包来管理带有 laravel 8 的 Shopify API 并面临以下错误:
HTTP/1.1 403 禁止 { "errors": "应用程序必须可扩展才能创建店面访问令牌。" }
尝试以下操作:
$shop = Auth::user();
$orders = $shop->api()->rest('POST', '/admin/api/2021-01/storefront_access_tokens.json', ['storefront_access_token' => ['title' => 'mobile']]);
dd($orders);
答案 0 :(得分:0)
我想回答我自己的问题,因为最终我找到了解决方案: 为此,您必须具备以下要求:
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_read_customer_customers
并且您需要注销(如果已经登录),然后使用 shopify 重新进行身份验证,然后您将能够使其工作。