Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwitchAPI.Helix.Channels.GetChannelFollowersAsync() returns empty list, but a valid "total" value #380

Open
CyberMermaidKometteVT opened this issue Dec 18, 2023 · 7 comments

Comments

@CyberMermaidKometteVT
Copy link

image
When I call GetChannelFollowersAsync(), using the right broadcaster ID with a token with the correct auths, I get an empty list for Data, an empty string under Pagination, but the correct number of total followers in Total. I'm guessing there's a mapping issue? But looking at your codebase that looks solid too?

@iProdigy
Copy link
Contributor

Make sure your token is a user access token for the broadcaster (or a moderator of channel) with the moderator:read:followers scope

You can check your token scopes via:

curl -X GET "https://id.twitch.tv/oauth2/validate" -H "Authorization: OAuth <your-access-token>"

@CyberMermaidKometteVT
Copy link
Author

It is - in fact I made the same call with cURL, copy-pasting my authentication information from my running instance, and I got the expected behavior.

@Syzuna
Copy link
Member

Syzuna commented Dec 18, 2023

What version are you using?
Just tested with the latest 3.10 prerelease and 3.9.0 but I can't reproduce the issue.
I get back the follower list for the channel just fine.

@CyberMermaidKometteVT
Copy link
Author

Hmm, I'm currently running 3.9.0. I'll poke with it further I guess?

Would we expect from a failure state to be getting the Total field filled in correctly as pictured, and no exception?

@Syzuna
Copy link
Member

Syzuna commented Dec 18, 2023

According to Twitch this should only happen if the user access token is missing the moderator:read:followers scope, or the user isn’t the broadcaster or moderator for the channel.
You always get the total but not the actual list if you fail authorization. Sadly you don't really get an indicator for that

@iProdigy
Copy link
Contributor

Have you tried explicitly passing the accessToken parameter for that method? (perhaps you have multiple tokens, and have specified the wrong one)

@CyberMermaidKometteVT
Copy link
Author

I only have a single token for the application.

That being said, I've tried explicitly checking both of those things. I've tried manually setting the accessToken, and I've run a cURL command copy-pasting the values from my debugger into the cURL command, including that accessToken, and it works just fine.

Any further thoughts? I'm happy to believe that I'm messing up somehow, somewhere :)

Thanks for y'all's help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants