Can someone help me and tell me where the problem is?
I know you probably post links to the docs of the API V5 and the new Api. Please don’t do that, I already know all of them from all other forum posts and from all stackoverflow posts. That doesn’t get me any further as I seem to have a mistake in my thoughts somewhere.
Step 1) Setup an oAuth loop to get a token for yourself that will read subscribers
Step 2) Store that token and the refresh token in a database
Step 3) user logs into your website as them
Step 4) use the users token to get their user ID
Step 5) call the subscribers API with their userID and your userID (as the broadcasterID) but your oAuth token that you load up from the database.
You would store your oAuth token (and refresh token) in a database and recall it/refresh it as needed.
You have all the right parts. You just didn’t connect the dots.
The token you generate for yourself will be valid for four hours, but because you have a refresh token, you can refresh it as needed whenever you need it. Then store the new token back in the database for later use.
No you just have to login/create your oAuth token with subscriber access whenever the refresh token procedure fails, which should only be if you disconnect your own app, or your reset your password.
Ok that was the problem. I am stupid ^^
Do i only get 20 subscribers? In Doc there are two parameters first and after. But how are these to be used as parameters in the url?
You can specify a from_id (user) and to_id (broadcaster) to get the date that somesuer followed lirik on Twitch. (Names for example to illustrate relationship)