Skip to content

Instantly share code, notes, and snippets.

@blissfulyoshi
Last active August 16, 2020 22:01
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/324eaf13b0075c96e067a6c5ca6c01eb to your computer and use it in GitHub Desktop.
Save blissfulyoshi/324eaf13b0075c96e067a6c5ca6c01eb to your computer and use it in GitHub Desktop.
Get User_Id for Twitch API
var header = {};
header['Client-ID'] = 'Client-ID';
header.Authorization = 'Bearer ' + 'oauth key';
//assume jquery is loaded
var submitRequest = $.ajax({
url: 'https://api.twitch.tv/helix/users?login=' + 'username',
type: "get",
headers: header
});
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