question

alien426 avatar image
0 Likes"
alien426 asked ·

Redirected to error page when providing a callback in query

When providing a callback in the URL one is redirected to " https://www.ebay.com/n/error";. This started only recently (late September 2019); previously it worked with the "&callback=functionname" form. Using the "Tolkien" example from [findItemsAdvanced API reference][2]: - base: works - base + "&callback=blubb": fails - base + "&callback=true&callbackname=blubb": fails - base + "&callback=_cb_findItemsAdvanced": fails - base + "&callback=true&callbackname=_cb_findItemsAdvanced": fails The callback is necessary when using the URL/JSON approach, see [JavaScript (URL/JSON) tutorial][1]. Note that changing the example from "RESPONSE-DATA-FORMAT=XML" to "RESPONSE-DATA-FORMAT=JSON" results in the same behavior. [1]: https://developer.ebay.com/DevZone/finding/HowTo/GettingStarted_JS_NV_JSON/GettingStarted_JS_NV_JSON.html [2]: https://developer.ebay.com/DevZone/finding/CallRef/findItemsAdvanced.html
jsoncallbackurl-call
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.

clickimusprime avatar image
0 Likes"
clickimusprime answered ·
Long term, it's the better way to go. This broke before and even if they do fix it, it will probably break again at some point. A server-side proxy is an opt-out of the current and future problems.
· 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.

alien426 avatar image
0 Likes"
alien426 answered ·
Thanks for the answer. It sucks that eBay borked a basic functionality and that there is a menu item "Support Ticket" (under "Support" in this forum) ... that just redirects to " https://developer.ebay.com". I was hoping that eBay devs would read the forum, but I guess the crutch with PHP might be the least hassle.
· 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.

clickimusprime avatar image
0 Likes"
clickimusprime answered ·
Yes it's a known issue. File a ticket with support. They may repair it. The callback feature has been disabled before. FWIW, the callback parameter is not necessary to process the data. The jsonp:false, cache: false options disable the callback parameter. But eBay responds with text/plain, so the data is still inaccessible. It they changed the content type to application/json, requests without the callback parameters could access the data. A workaround is to use a server-side proxy page in your domain to fetch the data and relay it to jQuery. This bypasses all the browser security issues and both misconfigurations on the server. I posted an example: https://forums.developer.ebay.com/questions/32581/php-proxy-example.html
· 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.