Hard-Coded Tokens
Hard-coded tokens are not recommended.
While we do not recommend the use of hard-coded tokens in any circumstances, it is possible to create a one-off OAuth token and to use it for TwiWorks. A potential related use-case is presenting a text box inside of your application where users can insert their token (or multiple if you'd like to connect with multiple accounts). In any case, because of the high chance of leaking tokens (especially if they are packaged into your game), they are not recommended.
We have no affiliation/endorsement for any of the following token generation sites. Use them at your own risk
Still want to go ahead? All right, first thing you'll want to do is get yourself a nice new Twitch OAuth token. There's a bunch of options for token generators, but we'll link the twitchapps.com TMI token generator and twitchtokengenerator.com here for convenience.
Once you've obtained the token, simply make a Twitch Credentials struct with the username of your account (in all lower case) and the Access Token you just generated. You can leave the Refresh Token blank for now as it won't be compatible with the hard-coded token login method. You can create this structure on-demand if you want to include it in a UI.
With this Twitch Credentials struct, you connect as normal. For further pointers on how to connect to Twitch, simply refer to the quickstart guide and skip over the login-related parts.