eBay Developers Program
  • Forums Sign in
  • My Account
    • My Developer Account
    • Solutions Directory
    • Applications Settings
  • Forums
    • Orders, Returns and Feedback
    • Java SDK for Trading API
    • Search
    • Selling
    • Talk to Your Fellow Devs
    • .Net SDK for Trading API
    • Tokens, Notifications, Messages
    • Feedback & Suggestions
  • Documentation
    • Release Notes
    • Finding API
    • Shopping API
    • Trading API
    • Large Merchant Services
    • Marketing Handbook
    • All Features Comparison
    • All API Documentation
  • Support
    • eBay SDKs
    • API Site Status
    • Program & News Blog
    • Compatible Application Check
    • Support Ticket
    • Knowledge Base
    • Developer Help Center
    • Search Details
  • Home
  • eBay Forums
  • Feedback, Comments, Suggestions /
avatar image

Question by $$anonymous$$ · Dec 11, 2014 at 12:47 AM · trading

Trading API GeteBayOfficialTime error code 10012

This was my attempt to use the GeteBayOfficialTime from the Trading API... I simply copied and pasted what worked from this site: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx and yet I'm getting a failure code... any ideas? It just so happens the GeteBayOfficialTime isn't on the top error codes list http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/Errors/errorsByCall.html, my error code is 10012

This is the code:

 function myFunction() {
   var url = "https://api.sandbox.ebay.com/ws/api.dll";
   var request = HtmlService.createHtmlOutputFromFile('xml').getContent();  
   var params = {
     method:'get',
     payload:request,
     headers: {
       "X-EBAY-API-COMPATIBILITY-LEVEL":851,
       "X-EBAY-API-DEV-NAME":"replace",
       "X-EBAY-API-APP-NAME":"replace",
       "X-EBAY-API-CERT-NAME":"replace",
       "X-EBAY-API-SITEID" :0,
       "X-EBAY-API-CALL-NAME":"GeteBayOfficialTime"
     }
   }  
   var response = UrlFetchApp.fetch(url, params).getContentText();    
   //var object = xmlToJson(response);
   Logger.log(response);
 }

This is the XML file that the 3rd line from the above code refers to, again, everything is copied and pasted:

 <?xml version="1.0" encoding="utf-8"?>
 <GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents">
 <RequesterCredentials>
 <eBayAuthToken>AgAAAA**AQAAAA**aAAAAA**triHVA**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wFk4GhDZCEpgWdj6x9nY+seQ**jCIDAA**AAMAAA**/XPgXcRnaejGehkQ2nE0DIhDMwgoLxOTvGjNjrk11mjwaoKKEfHfkSaLi62yiWfSVdV00Tti80FO1EBRkLMks+PEmmBeaojuZypfWZw7AiuM9OkBkdl+wCrz/WzXfJ+N96aTC5lNZgb/sb1tO9YwonKsA0O+MJimIZVRXtliHOtUj++uESumlu/toPS5GEYAIZrlAe4FUDl+YMy58113zU/jP/eZ+AQrAPB0uopY6Kn16d/S2vkRBAG0+G/XZaEGT4rFWwsix5TgZfjfUozVu0WHcZN+8peIJYM3FLxuZceEbUcwrRXe/wFY4o0ICkTH+H2WHUQBoukhPuJJzHXS1DOGRpBkRRoFuPeI2HdhNHO0cjAWMhega9y7SJi7zShOkrUO4FfI6V5wSMhkU7GWjzmlCQLDjFJpo7R8KRLwqW1pECF9m4u8MPqHl3UxjAdny1VWUloAVD0HsZ0Y8mpOqR6gsZUQUYatAux6Fy3DvIGCSrQ38QVknOsrX5V3gF9QX5As0P4CnB2BvebsT0AHdiPfjWQ+BbqxZX9tDPKyz1fCNQ7BwJ7Loi5W9yOTK+ngO4p/VY/UbwLCI7FnKrBARcrXc1y4ghak29QIBXO/fm/29LUsKau5/1GUtbp1lLm9pB+MhXaKsieWg/bn/Z2p26ygGTNjLnAam5c2thR3YYbUIey1LcV6J6GvswfItHa0D5rThtx/RfwZTUiiamF7njpOAvhiZGh8gBZzfTzqbGHJZraGRWTiGN7loUaiURv3</eBayAuthToken>
 </RequesterCredentials>
 </GeteBayOfficialTimeRequest>

This is the response:

 <?xml version="1.0" encoding="UTF-8"?>
 <GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2014-12-11T00:36:10.345Z</Timestamp><Ack>Failure</Ack><Errors><ShortMessage>Invalid value for header &quot;X-EBAY-API-SITEID&quot;.</ShortMessage><LongMessage>Header &quot;X-EBAY-API-SITEID&quot; with value &quot;0.0&quot; is out of range.</LongMessage><ErrorCode>10012</ErrorCode><SeverityCode>Error</SeverityCode><ErrorParameters ParamID="0"><Value>X-EBAY-API-SITEID</Value></ErrorParameters><ErrorParameters ParamID="1"><Value>0.0</Value></ErrorParameters><ErrorClassification>RequestError</ErrorClassification></Errors><Errors><ShortMessage>Invalid value for header &quot;X-EBAY-API-COMPATIBILITY-LEVEL&quot;.</ShortMessage><LongMessage>Header &quot;X-EBAY-API-COMPATIBILITY-LEVEL&quot; with value &quot;851.0&quot; is out of range.</LongMessage><ErrorCode>10012</ErrorCode><SeverityCode>Error</SeverityCode><ErrorParameters ParamID="0"><Value>X-EBAY-API-COMPATIBILITY-LEVEL</Value></ErrorParameters><ErrorParameters ParamID="1"><Value>851.0</Value></ErrorParameters><ErrorClassification>RequestError</ErrorClassification></Errors><Version>893</Version><Build>E893_CORE_API_17097905_R1</Build></GeteBayOfficialTimeResponse>

People who like this

0
Comment
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by helios825 · Dec 11, 2014 at 05:58 AM

2 things to try, each of which may solve your problem:

1) Use Production instead of Sandbox. Endpoint: https://api.ebay.com/ws/api.dll

2) Make sure your header params include a colon within the quotes for each label, like:

 X-EBAY-API-DEV-NAME:
 X-EBAY-API-CERT-NAME:
Comment

People who like this

0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image


Support

Developer Help Center
eBay Developers Program Blog
API Site Status
Request Support
Knowledge Base
Developer Forums
eBay Software Development Kits

API Information

API License Agreement
API Documentation
API Call Limits
Marketing Handbook
API Features Comparison

Apps Center

Applications Directory
Solutions Directory

Social Media

     

Programs

About Us
Success Stories
Affiliate Developers
eBay Market Data Program
Developer Directory
Developer Jobs
Copyright 1999 - 2019 eBay Inc. All rights reserved. User Agreement | Privacy Policy.    Site Feedback
  • Anonymous
  • Login with eBay
  • Create
  • Ask a question
  • Forums
  • Buy APIs (BETA) - Browse
  • Buy APIs (BETA) - Order
  • Feedback, Comments, Suggestions
  • New Sell APIs - Account, Inventory, Catalog and Compliance
  • New Sell APIs - Fulfillment
  • New Sell APIs - Marketing, Analytics, Metadata
  • Post Order APIs - Cancellation
  • Post Order APIs - Inquiry, Case Management
  • Post Order APIs - Return
  • Talk to your fellow developers
  • Token, Messaging, Sandbox related issues
  • eBay APIs: .NET SDK for Trading API
  • eBay APIs: Java SDK for Trading API
  • eBay APIs: Orders, resolutions and feedback
  • eBay APIs: Search
  • eBay APIs: Selling
  • Explore
  • Tags
  • Questions
  • Users
  • Badges