# Issue with channel followers endpoint

**URL:** <https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423>\
**Category:** API\
**Created:** [September 16, 2023, 7:21pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423 "2023-09-16T19:21:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedanives](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/thedanives/32/25375_2.png) [@thedanives](https://discuss.dev.twitch.com/u/thedanives)\
**Post date:** [September 16, 2023, 7:21pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/1 "2023-09-16T19:21:07Z")

</div>

Hi,

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:

`https://api.twitch.tv/helix/channels/followers?user_id=123&broadcaster_id=456`

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?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 16, 2023, 7:26pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/2 "2023-09-16T19:26:15Z")

</div>

> [@thedanives](#):
>
> 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.

This endpoint requires

- a token from `broadcaster_id`
- a token from a moderator of `broadcaster_id`

> [@thedanives](#):
>
> 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?

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:

```auto
twitch token -u -s moderator:read:followers

```

User/Token check

```auto
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": "https://static-cdn.jtvnw.net/jtv_user_pictures/bc86004d-14e4-442c-8aab-f19f0ef36e12-channel_offline_image-1920x1080.png",
      "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/71229bd8-0b30-48f0-9bd5-83deb58f2876-profile_image-300x300.png",
      "type": "",
      "view_count": 0
    }
  ]
}

```

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

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

```

> [@thedanives](#):
>
> I get a 401 error

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

---

<div class="post-metadata">

**Author:** ![thedanives](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/thedanives/32/25375_2.png) [@thedanives](https://discuss.dev.twitch.com/u/thedanives)\
**Post date:** [September 16, 2023, 7:39pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/3 "2023-09-16T19:39:28Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 16, 2023, 7:41pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/4 "2023-09-16T19:41:04Z")

</div>

> [@thedanives](#):
>
> I think the issues I’m seeing are for users who haven’t made the account they are using a moderator.

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)

---

<div class="post-metadata">

**Author:** ![thedanives](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/thedanives/32/25375_2.png) [@thedanives](https://discuss.dev.twitch.com/u/thedanives)\
**Post date:** [September 16, 2023, 7:48pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/5 "2023-09-16T19:48:47Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [October 16, 2023, 7:48pm UTC](https://discuss.dev.twitch.com/t/issue-with-channel-followers-endpoint/47423/6 "2023-10-16T19:48:59Z")

</div>

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