Using helix (specifically the "get-user-followers" call) on client/broacaster side

Hi, I am working on a mod for the game beat saber currently and am trying to implement a feature that checks needs to know if a viewer is a follower or not and I am struggling to figure out how to make the request. I know the endpoint I need to use (ie:<viewer ID>&to_id=<broadcaster ID>) but I don’t know how to make the call itself considering I can’t use a client id in this situation (since the mod will be running on the broadcaster’s computer and it seems client id’s are not designed for this use case).

I’ve seen mentions that you can use the OAuth token in place of a client id, but I have been unable to find any documentation on how this is actually done. Did I misinterpret what I read, or am I just bad at searching the documentation? If I did misinterpret what I read, would the most viable option just be to setup a proxy server to handle the requests?

Thank you all for any help you can give ^^

If you are running this broadcaster side, then you’ll use a clientID to generate an Implict Auth token.

You’d get the broadcaster to login via Twitch,
Then use that oauth token.

Here’s a pure JS example

Using just a ClientID the caster can login, giving you the oAuth token and the broadcaster ID to call the API with. ClientID’s are public and can be shared.

The alternative is a proxy server as you already suggest. Your mod talks to your server and the server uses an App Access Token to query the API with.

Personally, I’d go the proxy route as then you can cache data and save some lookups.

1 Like

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