How can I continue using the API with OAUTH on my site?

Hi! I have a website where I post user streams. My server periodically requests the information from Helix API about users of my site: name, display_name, avatar; and streams information: title, game_id, etc.
Is it enough for me to add the bearer access token (60 days work) of the my APP so that my requests to the Helix API continue working? Users of my site do not use twitch authentication. Thanks.

If you have a server, just use an app token, and refresh it when it will expire or is expired :slight_smile:

As suggested, either use an App Access Token, or since:

I would add Twitch Authentication to your site, which then grants a User Access Token, which you can use and check if you are still permitted to look up that user.

Do I have to use the same app token and refresh it once it expired? Or could I just generate a new app token everytime my server makes a request? Could be 100s of times per minute though.

You can’t refresh App tokens. Sending the POST request again to get a new token is the only way to go about getting a new App Access Token.

Don’t do that. App Access Tokens last roughly 60 days so there’s no need to spam the endpoint to generate new ones, it’d would be insanely excessive to generate a new one for each request you do.

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