我使用的是亚马逊(FBA)库存API(https://developer.amazonservices.com/doc/fba/inventory/v20101001/php.html/185-9758808-3007701),但在执行“ListInventorySupplySample.php”后出现以下错误。谁能帮助我知道出了什么问题。
$request = new FBAInventoryServiceMWS_Model_ListInventorySupplyRequest();
$skus= new FBAInventoryServiceMWS_Model_SellerSkuList();
$skus->setmember(<sku>);
$request->setSellerId(SELLER_ID);
$request->setSellerSkus($skus);
$request->setMarketplace(MARKET_PLACE_ID);
$request->setQueryStartDateTime(date(DATE_FORMAT,strtotime(date("Y-m-d"). ' - 10 days')));
invokeListInventorySupply($service, $request);
粘贴请求。
FBAInventoryServiceMWS_Model_ListInventorySupplyRequest Object
(
_fieldsrotected => Array
(
SellerId => Array
(
FieldValue =>
FieldType => string
)
Marketplace => Array
(
FieldValue =>
FieldType => string
)
SellerSkus => Array
(
FieldValue =>
FieldType => FBAInventoryServiceMWS_Model_SellerSkuList
)
QueryStartDateTime => Array
(
FieldValue => 2014-09-23T00:00:00Z
FieldType => string
)
ResponseGroup => Array
(
FieldValue =>
FieldType => string
)
)
)
粘贴以下回复。
HTTP/1.1 401 Unauthorized
Date: Fri, 03 Oct 2014 05:43:55 GMT
Server: AmazonMWS
x-mws-request-id: 0d956be3-5811-40f8-9084-4fbd77a83936
x-mws-timestamp: 2014-10-03T05:43:55.676Z
x-mws-response-context: 6n6IpwjyWO/qMfDqEazU02NkR09zL//rlcQMgApvMkfE7zhCMq2n2OtOE0y0F7AT4rO4RyslSkY=
Content-Type: text/xml
Content-Length: 295
Vary: User-Agent
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">
<Error>
<Type>Sender</Type>
<Code>AccessDenied</Code>
<Message>Access denied</Message>
</Error>
<RequestID>0d956be3-5811-40f8-9084-4fbd77a83936</RequestID>
</ErrorResponse>
答案 0 :(得分:0)
问题已解决我在我的localhost中使用它,它位于代理后面。我把它上传到服务器的那一刻起了作用。谢谢你的帮助。