Lilrex
July 30, 2018, 6:21pm
1
I am working on getting new followers to a channel and I am able to get the User ID number from the return object, but using that “from_id” I tried doing a GET https://api.twitch.tv/helix/users/ ?client-ID=XXXXX…
but it returned an error.
I see in Karken you are able to do GET https://api.twitch.tv/kraken/users/ and get back
:"_id": “44322889”,
“bio”: “Just a gamer playing games and chatting. :)”,
“created_at”: “2013-06-03T19:12:02.580593Z”,
“display_name”: “dallas”,
“logo”: “https://static-cdn.jtvnw.net/jtv_user_pictures/dallas-profile_image-1a2c906ee2c35f12-300x300.png ”,
“name”: “dallas”,
“type”: “staff”,
“updated_at”: “2016-12-13T16:31:55.958584Z”
where i can pull out the display_name from there. Is this doable in Helix? am I just making a bad syntax call?
Dist
July 30, 2018, 6:59pm
2
Your Client-ID
should be sent as a header, not a querystrnig parameter like the User ID which is sent as the id
querystring parameter.
Lilrex
July 30, 2018, 7:03pm
3
noted, but is it possible to get a persons username in helix from their ID?
And thank you for assisting.
Dist
July 30, 2018, 7:20pm
4
Yes, like I just said, send the request with the id
parameter and you’ll get a response along the lines of:
{
"data": [{
"id": "44322889",
"login": "dallas",
"display_name": "dallas",
"type": "staff",
"broadcaster_type": "",
"description": "Just a gamer playing games and chatting. :)",
"profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/dallas-profile_image-1a2c906ee2c35f12-300x300.png",
"offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/dallas-channel_offline_image-1a2c906ee2c35f12-1920x1080.png",
"view_count": 191836881,
"email": "login@provider.com"
}]
}
Login
is their username.
Lilrex
July 30, 2018, 7:20pm
5
thank you very much Dist.
system
Closed
August 29, 2018, 7:20pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.