【发布时间】:2022-06-15 13:38:39
【问题描述】:
在 Shopify 上,我收到 paymentAppConfigure 错误(您无权访问此网站)。
$queryArr = [
'query' => 'mutation PaymentsAppConfigure($externalHandle: String, $ready: Boolean!) {
paymentsAppConfigure(externalHandle: $externalHandle, ready: $ready) {
paymentsAppConfiguration {
externalHandle
ready
}
userErrors{
field
message
}
}
}',
'variables' => [
'externalHandle' => 'API_token_key',
'ready' => true
]
];
$query = json_encode($queryArr);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Shopify-Access-Token:<My_token>', 'Content-Type: application/json'));
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
// echo "<pre>";
// print_r($err);
print_r($result);
此查询给出以下错误:
您无权访问本网站
另外,externalHandle API_token_key 是什么?我使用了 App API 密钥,但它不起作用。
【问题讨论】:
标签: shopify