Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitch deprecated API #241

Open
Anton0123 opened this issue Jun 7, 2018 · 2 comments · May be fixed by #259
Open

Twitch deprecated API #241

Anton0123 opened this issue Jun 7, 2018 · 2 comments · May be fixed by #259
Labels

Comments

@Anton0123
Copy link

The Twitch provider is currently using the old kraken V5 API which has been deprecated and replaced by the new helix API.

@TerribleDev
Copy link
Owner

Thanks @Anton0123 do you want to put in the work to update it?

@Anton0123
Copy link
Author

Anton0123 commented Jun 13, 2018

I think all that needs to be done is to change the TwitchAuthenticationOptions to:

private const string AuthorizationEndPoint = "https://id.twitch.tv/oauth2/authorize";
private const string TokenEndpoint = "https://id.twitch.tv/oauth2/token";
private const string UserInfoEndpoint = "https://api.twitch.tv/helix/users";

And on line 90 in TwitchAuthenticationHandler.cs to get the user:
var userRequest = new HttpRequestMessage(HttpMethod.Get, Options.Endpoints.UserInfoEndpoint); userRequest.Headers.Add("Authorization", Uri.EscapeDataString("OAuth " + accessToken));
I haven't tested this and I'm a bit unsure if the headers are right

@Nashuim Nashuim linked a pull request Aug 27, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants