For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

Error 2 - Unsupported Verb for XML request

  • Answer ID 877
  • Published 01/17/2007 12:57 PM
  • Updated 10/20/2013 06:41 AM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=877
Product

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.


Detailed Description

You need to set the following information in your request header:
  • Content-Type
  • Version
  • DevID
  • AppID
  • CertID
  • CallName
  • SiteID

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


Additional Resources

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter