##Register your application ##
Twitch settings -> connections -> register application
Authorize your application
You need the channel you’re altering to authorize your application with the scope channel_editor
.
The user needs to go to https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&scope=channel_editor
and fill in their password. (Your ID and redirect URI need to match those registered to your application.) The access token that you need will be sent as a parameter to REDIRECT_URI
.
##Make the request##
You need to send your access token
and new title/game data as headers in your request. Using cURL, it looks like this:
curl -H 'Accept: application/vnd.twitchtv.v2+json' -H 'Authorization: OAuth <access_token>' -d "channel[status]=New+Status!&channel[game]=New+Game!" -X PUT https://api.twitch.tv/kraken/channels/CHANNEL
You can always check here for more information!