Skip to content

Instantly share code, notes, and snippets.

@blissfulyoshi
Created August 16, 2020 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blissfulyoshi/cfcdc88f446c9d898f0a7036c24232e0 to your computer and use it in GitHub Desktop.
Save blissfulyoshi/cfcdc88f446c9d898f0a7036c24232e0 to your computer and use it in GitHub Desktop.
Update Twitch Stream Name and Game for AMQ streaming
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