question

magicupkeep avatar image
0 Likes"
magicupkeep asked ·

FindItemsByKeywords in VBA Please Help

Hi there, Can anyone help please, I have been spinning around in circles on this for a while now and cannot get it to work. I keep getting an error code 2. I can happily update auctions fine with the ReviseItemRequest, but I also want to be able to use the FindItemsByKeywords and FindItemsAdvanced calls as well. Here is what I have, please help :) Sub findItems() Dim body As String body = " " & _ " " & _ " MYAUTHTOKEN " & _ " " & _ " " & _ " harry potter phoenix " & _ " " Set objHTTP = New WinHttp.WinHttpRequest URL = " https://api.ebay.com/ws/api.dll"; objHTTP.Open "POST", URL, False objHTTP.setRequestHeader "X-EBAY-SOA-SERVICE-NAME", "FindingService" objHTTP.setRequestHeader "X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords" objHTTP.setRequestHeader "X-EBAY-SOA-SERVICE-VERSION", "1.0.0" objHTTP.setRequestHeader "X-EBAY-SOA-GLOBAL-ID", "EBAY-GB" objHTTP.setRequestHeader "X-EBAY-SOA-SECURITY-APPNAME", "MYAPPNAME" objHTTP.setRequestHeader "X-EBAY-SOA-REQUEST-DATA-FORMAT", "XML" objHTTP.send (body) Set objXML = New MSXML2.DOMDocument objXML.LoadXML (objHTTP.ResponseText) MsgBox objHTTP.ResponseText Set objHTTP = Nothing Set objXML = Nothing End Sub
finditemsadvancedfinditemsbykeywordsvba
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
davidtsadler avatar image
0 Likes"
davidtsadler answered ·
There are two changes that your code needs. - The URL for the Finding service is http://svcs.ebay.com/services/search/FindingService/v1 - You do not need the `RequesterCredentials` element in your request.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.