question

christofffffel avatar image
0 Likes"
christofffffel asked ·

Can't get application token because of no Access-Control-Allow-Origin error

Hello everyone, I'm experimenting eBay API, but I can't get application token because eBay server does not support CORS ( https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). When I make a POST request with jQuery ajax() or fetch API to https://api.sandbox.ebay.com/identity/v1/oauth2/token with all the correct parameters, the response is not sent by the server. I get the following error: "Response to preflight request doesn't pass access control check: **No 'Access-Control-Allow-Origin'** header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. This means I can only get the application token while being on the same server of eBay. How can this be possible? This is not mentioned in the documentation. Is there a way to get the application token with a cross server HTTP request? Thank you.
token
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.

0 Answers

· Write an Answer

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.