400 grant_type malformed on refresh

Should be:

WebRequest request = WebRequest.Create(“https://api.twitch.tv/kraken/oauth2/token”);

According to: Authentication | Twitch Developers

To refresh, use this request:

curl -X POST https://api.twitch.tv/kraken/oauth2/token 
--data-urlencode
?grant_type=refresh_token
&refresh_token=<your refresh token>
&client_id=<your client ID>
&client_secret=<your client secret>
1 Like