skip to Main Content

I’m trying to make a getmyebayselling request so I can track the prices and quantities of current listings.

Following the docs and sample here I generated a token and tried sending a request to the production XML to see my current listings.

Current attempt:

endpoint = "https://api.ebay.com/ws/api.dll"
xml = """<?xml version="1.0" encoding="utf-8"?>
<GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>AgAAAA*...full auth token here...wIAYMEFWl</eBayAuthToken>
  </RequesterCredentials>
  <Version>967</Version>
  <ActiveList>
    <Sort>TimeLeft</Sort>
    <Pagination>
      <EntriesPerPage>3</EntriesPerPage>
      <PageNumber>1</PageNumber>
    </Pagination>
  </ActiveList>
</GetMyeBaySellingRequest>"""
headers = {'Content-Type': 'application/xml'}
response = requests.post(endpoint, data=xml, headers=headers)
print response
print response.content

The response:

<?xml version="1.0" encoding="UTF-8" ?><GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2017-04-17 13:01:25</Timestamp><Ack>Failure</Ack><Errors><ShortMessage>Unsupported API call.</ShortMessage><LongMessage>The API call "GeteBayOfficialTime" is invalid or not supported in this release.</LongMessage><ErrorCode>2</ErrorCode><SeverityCode>Error</SeverityCode><ErrorClassification>RequestError</ErrorClassification></Errors><Build>18007282</Build></GeteBayOfficialTimeResponse>

The useful part of that response:

The API call "GeteBayOfficialTime" is invalid or not supported in this release.

I’m working from a sample of their own docs here. The only link to time I could really see was <Sort>TimeLeft</Sort> which was a stretch but even without that I get the same response.

I was faffing around with different Python libs trying to get a getmyebayselling request working without much documentation. Now going by the docs from eBay themselves I’m feeling pretty dead in the water. If anyone can nudge me in the right direction I’d appreciate it. Not really sure what to try next.

2

Answers


  1. The API response error is a little less than helpful, but judging by the code you shared you are making the request with missing required header fields. More details here

    The following change should point you in the right direction –

    headers = {
        'X-EBAY-API-COMPATIBILITY-LEVEL': '<compat_level>',
        'X-EBAY-API-CALL-NAME': '<api_call_name>',
        'X-EBAY-API-SITEID': '<api_siteid>',
        'Content-Type': 'application/xml'
    }
    
    Login or Signup to reply.
  2. Suddenly I started getting the error message:

    The API call "GeteBayOfficialTime" is invalid or not supported in this release.
    

    But I was not calling GeteBayOfficialTime! I had a problem, but the error message was misleading.

    To make sure you get the post headers and content right, the build test tool is absolutely helpful:

    ebay developer build test tool

    After hours of troubleshooting, I finally figured out my problem: I was passing the required headers in the query string, not as http request headers! For over a year, it worked OK, but then suddenly it stopped working.

    Moral: the invalid “GeteBayOfficialTime” API call message indicates a problem with the http headers.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search