Getting Subscriber List from Server

I have a working API Code using the new API (Helix) that is able to retrieve all of my Subscribers and currently dumps them into a database, this is all well and good; however I need this script to run roughly every hour. I plan on using a cronjob to do this, but this is where my issue starts.

I have no idea how to take my working code, and actually get the server to be able to use it. When doing it from my own browser, despite the code running on the server itself, I had to log into it w/ my own credentials, that isn’t possible w/ an automated script (I think?). I’d like this to run on its own :frowning:

does anyone have any suggestions for obtaining a subscriber list on a timer?

You would need to collect and store your credentials in the very same database (or in a flat file if you prefer)

Your token will only be valid for abound 4 hours (generally speakling) but it will come with a refresh token you can use to regenerate the access token.

This nodeJS example I wrote t’other day, descibes a method to collect, store and regenerate a broadcasters token for use by a backend service. (Example illistrates a “moderator dashboard” example and a “subscribers portal” example). Which should illustrate a suitable workflow to do what you are after.

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