【问题标题】:Can not get eBay auth Token to work无法让 eBay auth Token 工作
【发布时间】:2016-08-02 03:36:02
【问题描述】:

我正在为一门课程制作一个电子商务网站,我正试图将其全部绑定到我的 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>

我做错了什么?

在测试工具中,我选择了生产并且正在使用生产授权密钥.....

【问题讨论】:

    标签: php xml ebay-api


    【解决方案1】:

    无需从头开始执行此操作。数千人已经使用 PHP 集成到 eBay。有很多现成的 SDK 可以简化并内置错误处理。这是目前维护的一个流行的。

    https://github.com/davidtsadler/ebay-sdk-php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-12
      • 1970-01-01
      • 1970-01-01
      • 2016-02-05
      • 2017-04-03
      • 1970-01-01
      • 1970-01-01
      • 2020-02-23
      相关资源
      最近更新 更多