我正在为一个班级制作一个ecom网站,我正试图把它全部绑在我的eBay帐户上。真的不是eBay API的粉丝。我正在使用他们的测试工具:
头:
X-EBAY-API-SITEID:0
X-EBAY-API-COMPATIBILITY-LEVEL:967
X-EBAY-API-CALL-NAME:GetSellerList
X-EBAY-API-DEV-NAME:.........
X-EBAY-API-APP-NAME:........
X-EBAY-API-CERT-NAME:.........
并请求代码:
<?xml version="1.0" encoding="utf-8"?>
<GetSellerListRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>[I enter my 872 char auth key here...]</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<!--You can use DetailLevel or GranularityLevel in a request, but not both-->
<GranularityLevel>Fine</GranularityLevel>
<!-- Enter a valid Time range to get the Items listed using this format
2013-03-21T06:38:48.420Z -->
<StartTimeFrom>2016-03-21T06:38:48.420Z</StartTimeFrom>
<StartTimeTo>2016-08-01T06:38:48.420Z</StartTimeTo>
<IncludeWatchCount>true</IncludeWatchCount>
<Pagination>
<EntriesPerPage>200</EntriesPerPage>
</Pagination>
</GetSellerListRequest>
和我的回复:
<?xml version="1.0" encoding="UTF-8"?>
<GetSellerListResponse
xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-08-02T03:21:44.330Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Auth token is invalid.</ShortMessage>
<LongMessage>Validation of the authentication token in API request failed.</LongMessage>
<ErrorCode>931</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>967</Version>
<Build>E967_CORE_APISELLING_17965876_R1</Build>
</GetSellerListResponse>
我做错了什么?
在测试工具中,我选择了生产并使用生产验证密钥.....
答案 0 :(得分:-1)
没有必要从头开始。数千人已经使用PHP集成到eBay中。有很多现成的SDK可以简化并内置错误处理。这是目前维护的一种流行的。