Ok, but here we are back to the previous problem: I want this token to last undefinetly.
I don’t want a back-end modifying it, I just want to create this token, place it in the code and always use it to get the subs.
There is not the possibility to have something like this?
No, all access tokens (on systems not just Twitch, google for example), expire and then you have to use the refresh_token and client_secret to make a new token, thats if the refresh token is still valid (which usually only isn’t when the user has revoked the application link)
It seems I cannot avoid the creation of a server.
When I connect via ftp, I see
and my Angular build (the website) is stored inside public_html.
What is the best way to build a server listening only for the token and where to place it?
Since you need it just for you. You don’t need to put it on a “web accessable server”
You just need a bit of code to raise on say port 8000 some thing that can accespt a code from http query get
Exchange that code for the tokens payload.
Then turn the server off.
You can then give the token payload to your sub collector, and the sub collector can renew the token when it needs/wants to since it has all the information it needs.
I think I have found another solution.
The user logs to my website. I use this endpoint:
Thanks to it, I return the subscription that user have.
If the subscription match with my channel ID, then I’m done.
Is it good?
So I can use implicit oauth only.
Essentially, I was returning the subscribers on my channel and then check if a certain user ID was inside.
But I can reverse and say: the user logs in, I get his subscriptions, I check if my channel-Id is inside there.