I am trying to create a stream overlay for my stream using Unity. The documentation shows how to get a user to login, but I don’t need a user to login: I have an OAuth token for my app and I will be the only person to use this. How can I use the token to login in Unity?
Depending on what eventsub types and what API calls you want to make. You’ll still need you to login to it.
As you need to grant permissions between the user and the clientID.
Whom owns the clientID is irrelevant
Unless I’m mistaken, this unity package is basically a wrapper for the twitch api, which doesn’t require jumping through all these hoops, just use curl or similar to get the oauth token then pass the token with each request. Why does this package require me to login to my overlay each time?
Whose/which package? As you didn’t state that in your OP
Assumed you mean the general authentication documentation
The Twitch Game Engine Plugin is designed for client-side use that will be distributed to multiple users, as such it is designed around using the Device Code Flow (DCF), so it will require user login.
If you don’t need any permissions, so only getting public data that doesn’t scopes, and you are only not going to distribute the app to other users, you can use the Client Credentials flow within your Unity app but you will need to code that yourself as the Game Engine Plugin is built around DCF.
Apologies, I thought it was obvious from context. I am trying to use the twitch game engine plugin for unity. The documentation I reference is the documentation for that plugin.
Well that sucks. Does anyone know of an alternative plugin that isn’t abandonware?
If you don’t want to use the Twitch Game Engine Plugin, you could just use any HTTP library for the Helix API and simply make the requests as documented.
Personally I’d just recommend using the Game Engine Plugin, login one to get an Access Token and Refresh Token and from then on it shouldn’t need any further user interaction with OAuth as it can programmatically get new tokens. Otherwise you’re just making this harder for yourself for no real reason.
This topic was automatically closed after 30 days. New replies are no longer allowed.