18910140161

PHP-使用特定的Shopify商店数据调用Laravel中的Shopify API.-堆栈溢出

顺晟科技

2022-10-18 13:55:07

30

    Laravel PHP中
  1. 的Shopify公共API.运行应用程序到此类型错误显示在Laravel 7

顺晟科技:

公共API这假设您在合作伙伴的仪表板中正确地设置了应用程序,并具有正确的密钥和重定向URI.

休息(同步)对于REST调用,需要商店域和访问令牌。

use Osiset\BasicShopifyAPI\BasicShopifyAPI;
use Osiset\BasicShopifyAPI\Options;
use Osiset\BasicShopifyAPI\Session;

// Create options for the API
$options = new Options();
$options->setVersion('2020-01');

// Create the client and session
$api = new BasicShopifyAPI($options);
$api->setSession(new Session('example.myshopify.com', 'access-token-here'));

// Now run your requests...
$result = $api->rest(...);
  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航