For my own amusement Im trying to create a C# library talking wiht the API and so far so good. I just struck a weird thing where my library will work when I do a GET request on api.twitch.tv/kraken?oauth_token=token with correct information, but if I try to go to api.twitch.tv/kraken/user?oauth_token=same token I get a 401 error. Now what strikes me as weird is that if I do a simple output of the URL I send the GET request to, copy/paste it to a browser without altering it, it works without any errors.
And to add to it I used the same URL on my roommates computer to demonstrate and ask for advice from him and on HIS computer MY Oauth token gives his account information.
So am I missing something stupidly obvious here?
using(var client = new HttpClient())
return await client.GetStringAsync(url);
This is the simple code I use to make the GET request, Which also is where the exception is thrown when I get the 401 error.
Shorter and cleaner version of question:
GET https://api.twitch.tv/kraken?oauth_token=*mytoken* works
GET https://api.twitch.tv/kraken/user?oauth_token=*mytoken* Throws exception in application because it returns 401, but works when accessed in my browser
Why is this?