Issue with channel followers endpoint


I’ve recently migrated my app to use the new helix/channels/followers endpoint - however when trying to determine if a user is a follower I’m just getting ‘Unauthorized’ messages. For example, if I’m doing:

I get a 401 error unless I’m using an access token that matches the user ID, and that user is a moderator. So it seems that I’m unable to determine right now if a user follows a channel, unless that user is a moderator of the channel and I have their access token.

Previously, so long as the access token I provided was a moderator of the channel, I could determine if any user was a follower of that channel or not. This now longer seems to be the case - is this now no longer possible?

This endpoint requires

  • a token from broadcaster_id
  • a token from a moderator of broadcaster_id

That is how it works…

It’s working for me here

I am barrycarlyon of id 15185913
Whom is a moderator for cohhcarnage - 26610234
And I looked up one of my alt accouts

after doing

To get a token with the needed scope:

twitch token -u -s moderator:read:followers

User/Token check

barrycarlyon@Robyn ~ % twitch api get users
  "data": [
      "broadcaster_type": "partner",
      "created_at": "2010-09-01T17:51:01Z",
      "description": "Developer by Day, Developer by Night, Developer all the other times inbetween! Builder of Extensions and all things Twitch. From Overlays to Chat Bots and everything in between! A TwitchDev Twitch Ambassador!",
      "display_name": "BarryCarlyon",
      "id": "15185913",
      "login": "barrycarlyon",
      "offline_image_url": "",
      "profile_image_url": "",
      "type": "",
      "view_count": 0

and a call to get a follower for a channel I’m a mod of

barrycarlyon@Robyn ~ % twitch api get 'channels/followers?broadcaster_id=2661023
  "data": [
      "followed_at": "2019-08-28T09:59:28Z",
      "user_id": "61788418",
      "user_login": "noylracyrrab",
      "user_name": "noylraCyrraB"
  "pagination": {},
  "total": 1522543

Whats the body of the response it should describe the issue?

From what you wrote I would speculate you didn’t get the required scope on the token from the moderator

Hey Barry,

Thanks for that - I analysed the test code I’d written and found my mistake was in how I was providing the parameters through for the quick test I’d made up.

I think the issues I’m seeing are for users who haven’t made the account they are using a moderator. I’ll make sure this is highlighted appropriately for them. Thanks for your extremely quick assistance!!

Or you just get the broadcasters token as a “broadcaster is a mod of the channel” saves juggiling two accounts if they are makign an account specifically for doing follow checks. (use case sounds odd here atm lol)

Yeah its primarily because they are using a bot, and the bot has mod priv. to get the information. I do have the broadcasters access tokens, but I ended up causing a slight issue last time I integrated that. Might be that I should try to use it again going forward, something I’ll definitely take into consideration, thank you :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.