07-24-2024 12:43 PM
I have been using traditional find API for a long time and am migrating to the new browsing API.
With the oauth token I am able to use api_test_tool (https://developer.ebay.com/my/api_test_tool?index=0)
for browsing API without errors.
In my old version I used
as header : X-EBAY-API-IAF-TOKEN: token
as URL : "https://svcs.ebay.com/services/search/FindingService/..."
as supplementary information in URI : &RESPONSE-DATA-FORMAT=XML&SECURITY-APPNAME=EbayappID&GLOBAL-ID=yyyyy
In the new version
I removed all supplementary information in URL and used
as URL : "https://api.ebay.com/buy/browse/v1/item_summary/search?q=xxxx"
as headers :
-Authorization : Bearer + token
-X-EBAY-C-MARKETPLACE-ID:EBAY_US
-Accept=application/json
as method : Get
as ContentType :application/json
What is wrong ?
Questions :
-should all headers be url encoded ?
-should token be between " in header Authorization ?
- ...
Thanks for your help.
07-24-2024 03:49 PM
What error are you getting?
07-25-2024 12:53 AM - edited 07-25-2024 09:05 AM
"A system error has occurred, non supported protocol"
07-25-2024 11:16 AM
We are able to execute the search call successfully without any error. For the reference, you can find the cURL code snippet for the call below:
curl --location 'https://api.ebay.com/buy/browse/v1/item_summary/search?q=drone' \
--header 'X-EBAY-C-MARKETPLACE-ID: EBAY_US' \
--header 'Authorization: Bearer v^1.1#i^1#I^3#p^1#r^0#f^0#t^H4s' \
--header 'Accept: application/json'
For information regarding the URL encoding query parameter values, you can refer to the Request components guide: https://developer.ebay.com/api-docs/static/rest-request-components.html#operation
07-25-2024 03:54 PM
It is working as expected, here is my url
/buy/browse/v1/item/v1|285803824267|0?fieldgroups=PRODUCT
I did not specify any marketplace in header, just added the bear token.
07-28-2024 07:41 AM
Thanks to everyone.
New tests give error "Unsupported Protocol". The development tool I use was released in 2015. Could there be an HTTP version problem ?
07-28-2024 02:15 PM
Can you use postman tool?
07-29-2024 01:48 AM - edited 07-29-2024 01:58 AM
I do not know Postman (but why not, though I have to learn a minimum knowledge about it).
I suspect an HTTP 2 version problem : from a browser using the simple URL (without header) I receive a correct error message from Ebay API. From my app "unsupported protocol" (with or without header). HTTP 2 release date is incompatable with its support in the dev tool I use.