Created
August 16, 2020 22:03
-
-
Save blissfulyoshi/cfcdc88f446c9d898f0a7036c24232e0 to your computer and use it in GitHub Desktop.
Update Twitch Stream Name and Game for AMQ streaming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var header = {}; | |
header['Client-ID'] = 'Client-ID'; | |
header.Authorization = 'Bearer ' + 'oauth key'; | |
header['Content-Type'] = 'application/json'; | |
var data = { | |
game_id: '509058', | |
title: 'title', | |
broadcaster_language:"en" | |
}; | |
var submitRequest = $.ajax({ | |
url: 'https://api.twitch.tv/helix/channels?broadcaster_id=' + 'user_id of broadcaster', | |
type: "patch", | |
headers: header, | |
data: JSON.stringify(data) | |
}); | |
submitRequest.done(function (response, textStatus, jqXHR) { | |
console.log(response); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment