Home
Find the answer to your question
I have the following XML Schema request:
<?xml version="1.0" encoding="utf-8"?>
<GeteBayOfficialTimeRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>495</Version>
<RequesterCredentials>
<eBayAuthToken>*****</eBayAuthToken>
</RequesterCredentials>
</GeteBayOfficialTimeRequest>
The request is correct, so why I am still getting this error?
<?xml version="1.0" encoding="utf-8"?>
<GeteBayOfficialTimeRequestResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2007-01-17 20:09:42</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Unsupported verb.</ShortMessage>
<LongMessage>The API verb is not supported in this release..</LongMessage>
<ErrorCode>2</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>453</Version>
<Build>4073224</Build>
</GeteBayOfficialTimeRequestResponse>
Summary
Apart from ensuring that the body of the request is correct, you need to ensure
that the headers are also set correctly. One common gotcha is that in the
header you need to specify the name of the call minus the "Request" phrase.
For example, to get the eBay official time, you need to set the header to
"GeteBayOfficialTime" and in the request body, the root element needs to be
GeteBayOfficialTimeRequest. If you set the header to
GeteBayOfficialTimeRequest, you will get the unsupported verb error.
Here is an example of setting the Headers for GeteBayOfficialTime using
Javascript:
xmlHttpReq = new XMLHttpRequest();
xmlHttpReq.setRequestHeader('Content-Type','text/xml');
xmlHttpReq.setRequestHeader('X-EBAY-API-COMPATIBILITY-LEVEL','495');
xmlHttpReq.setRequestHeader('X-EBAY-API-DEV-NAME','devid');
.xmlHttpReq.setRequestHeader('X-EBAY-API-APP-NAME','appid');
xmlHttpReq.setRequestHeader('X-EBAY-API-CERT-NAME','certid');
xmlHttpReq.setRequestHeader('X-EBAY-API-CALL-NAME','GeteBayOfficialTime');
xmlHttpReq.setRequestHeader('X-EBAY-API-SITEID','0');
Version Info
The code example above was based on the versions specified below:
API Schema Version | 495 |