Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the stream key for twitch.tv

Tags:

stream

key

twitch

I write an app for broadcasting to twitch.tv using C++. For that streaming I need to know the user stream key, usually an user gets that key from the page,

http://www.twitch.tv/user_name/dashboard/streamkey

But I would like get it via my app by using the user name/password.

Any ideas?

like image 273
victor kulichkin Avatar asked Sep 02 '14 08:09

victor kulichkin


2 Answers

You will get it here (change "yourtwitch" by your twitch nickname")

http://www.twitch.tv/yourtwitch/dashboard/streamkey

The link simply moved. You can get this link on the main page of twitch.tv, click on your name then "Dashboard".

like image 57
orugari Avatar answered Oct 19 '22 16:10

orugari


This may be an old thread but I came across it and figured that I would give a final answer.

The twitch api is json based and to recieve your stream key you need to authorize your app for use with the api. You do so under the connections tab within your profile on twitch.tv itself.. Down the bottom of said tab there is "register your app" or something similar. Register it and you'll get a client-id header for your get requests.

Now you need to attach your Oauthv2 key to your headers or as a param during the query to the following get request.

curl -H 'Accept: application/vnd.twitchtv.v3+json' -H 'Authorization: OAuth ' \ -X GET https://api.twitch.tv/kraken/channel

documentataion here

As you can see in the documentation above, if you've done these two things, your stream key will be made available to you.

As I said - Sorry for the bump but some people do find it hard to read the twitch* api.

Hope that helps somebody in the future.

like image 6
Gabe Avatar answered Oct 19 '22 14:10

Gabe