i’m facing an issue creating a token.
I need a user User access token and i created the code thru “id.twitch.tv/oauth2/authorize”.
Once retrived the code, using the “id.twitch.tv/oauth2/token” I receive the message “Could not resolve proxy”.
curl -x post “https://id.twitch.tv/oauth2/token?client_id=xxxxxxxxxxxx&client_secret=xxxxxxxxxxxx&code=xxxxxxxxxxxx&grant_type=authorization_code&redirect_uri=http://localhost:3000”
This suggests your code/server is configured to use a proxy.
And that proxy is not working.
So it’s your system configuration at play.
Ty for yuor quick reply.
I exclude proxy use and now the errore becames “404 page not found”
Onestly i don’t undestand the issue
For curl it’s
-x (upper case
X) to declare the method for the request.
i know, it was a typo.
now after the proxy bypass the curl error becames
400 Bad Request
400 Bad Request
That should come with a error message text to describe the issue.
The HTTP code on it’s on will not help
Assuming this is what you sent, other than switching to
-X I don’t see anything wrong here.
Unless you just copy/pasted the documentation examp,e and your redirect_uri is not exactly
unfortunally not, here attached the curl reply
That looks like a proxy block or your ISP blocking traffic or some sort of parental/school control or a temporary fastly issue. Or something else preventing you reaching Twitch Services normally.
it’s quite weird, i used the call already in past.
i have a private connection and no limit are in place.
and, even if the call has been blocked, why “id.twitch.tv/oauth2/authorize” passes and “id.twitch.tv/oauth2/token” no?
it doesn’t make sense to me
You loaded /authorize in a browser
You loaded /token in command line curl
If it’s firewall then a browser “looks legimate due to all the user data” where command line curl looks suspciious as it’s command line.
And both calls are very different operations
It could be “firewall” type stuff. When things like this happen it doesn’t make sense.
Could also be that something is middlemaning your connectiong and getting confused over the non URL encoded redirect_uri