Live bits events are provided either
- via chat - Twitch IRC Tags | Twitch Developers
bits
tag of a PRIVMSG - via pubsub - PubSub | Twitch Developers - bits (v2)
- via eventsub - EventSub Subscription Types | Twitch Developers
Well it’s undocumented so it doesn’t need speicific headers and can change or break at any time.
Helix (and kraken/old API) don’t provide a bits/events
endpoints, it’s all Chat/PubSub and now EventSub.
This depends on the HTTP library you are using.
It should provide documentation on how to add headers or tell it you are using oAuth.
You’ll also need to setup a simple webpage or callback system to obtain a suitably scoped oAuth access token for your account in order to read the bits data
Pick which one of the three methods you want to use and work out from there. For Unity you probably want Chat or PubSub since you are not on a web accessable server and eventsub doesn’t have a socket transport yet