Last active
August 16, 2020 22:01
-
-
Save blissfulyoshi/324eaf13b0075c96e067a6c5ca6c01eb to your computer and use it in GitHub Desktop.
Get User_Id for Twitch API
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'; | |
//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