I\'m trying to do the 3-legged authorization necessary to call the Twitter APIs in a browser. The process starts with getting a request token by POSTing a signed request to
Check this workaround: https://stackoverflow.com/a/43881141
If you don’t control the server your frontend JavaScript code is sending a request to, and the problem with the response from that server is just the lack of the necessary Access-Control-Allow-Origin header, you can still get things to work—by making the request through a CORS proxy.
In short, prefix the request so the full URI looks something like this:
https://cors-anywhere.herokuapp.com/https://api.twitter.com/oauth/request_token
Unfortunately, you will not be able to use most Twitter libraries this way, but you can continue using fetch with the cors-anywhere prefix.