0

我正在构建bigcommerce APP。但我无法获得“AuthToken”。请帮忙。请参阅下面的完整代码。还附上了带有 NULL 响应的图像。

require_once($_SERVER['DOCUMENT_ROOT'].'/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php');
use Bigcommerce\Api\Client as Bigcommerce;

$object = new \stdClass();
$object->client_id = BC_CLIENT_ID;
$object->client_secret = BC_CLIENT_SECRET;
$object->redirect_uri = 'https://yourwebsiteurl.com/oauth.php';
$object->code = $_GET['code'];
$object->context = $_GET['context'];
$object->scope = $_GET['scope'];

$authTokenResponse = Bigcommerce::getAuthToken($object);

图片

4

0 回答 0