Hello!
I need to do an integration between my app(C# Windows forms desktop) and Twitch API.
I am using a webBrowser object. I use it so:
string _url = "https://id.twitch.tv/oauth2/authorize?client_id=__MY_CLIENT_ID__&redirect_uri=http://localhost&response_type=token&scope=channel_read";
webBrowser.Navigate(_url);
After call this url I get the ‘acess_token’.
Now I need to get the ‘STREAMKEY’. How can I get this information?
Call, with a token with scope channel_read
Thank you!
I am doing a get request to:
https://api.twitch.tv/kraken/channel
content-type = application/json
HEADER Authorization = MY_ACESS_TOKEN
But I have this error:
{
“error”:“Bad Request”,
“status”:400,
“message”:“No client id specified”
}
Where am my mistake?
As documented:
curl -H ‘Accept: application/vnd.twitchtv.v5+json’ \ -H ‘Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2’ \ -H ‘Authorization: OAuth cfabdegwdoklmawdzdo98xt2fo512y’ \ -X GET ‘https://api.twitch.tv/kraken/channel’
Yon need a V5 accept header
And your Authorization header should have it’s token preceeded by oAuth
Hello again!
I do: GET https://api.twitch.tv/kraken/channel
And

where Autorization is my acess_token
And
I set OAUTh and mu client_id
And I have this result:
{
“error”:“Bad Request”,
“status”:400,
“message”:“No client id specified”
}
And your Authorization header should have it’s token preceeded by oAuth
Yes. My token I get it after call webBrowser.Navigate("");
Do you have some small sample using JAVA or C#?
Authorization header should be
Authorization: oAuth YourToken

Here needs to be
Authorization=OAuth YourToken
Edit: corrected OAuth from oAuth
Please confirm the error you are getting now.
{
“error”:“Bad Request”,
“status”:400,
“message”:“No client id specified”
}
It’s Authorization: OAuth
my second reply was miscased
Thank you!
My code works correctly now 
system
closed
#12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.