This is a small sample implementation of Drops using client-side device code flow (DCF). Handles authorization, pulling entitlements and updating the status of those entitlements.
- .NET 6.0 SDK or later
- Twitch Developer Application and Client ID
- Twitch Account (for authorization)
Here are four examples from various build environments.
Clone this repository and then navigate to the project directory.
#Ensure dependencies before building or running
dotnet restore
dotnet build
dotnet run
- Clone this repository and then add that folder to your Visual Studio Code instance.
- Right click on TwitchDrops.cdproj
- Click Build
Clone this repository to a folder then:
- Open the solution file. (TwitchDrops.slnx)
- Right click on the project in the solution explorer.
- Select: "Restore NuGet Packages"
- Click build. (Or use the hotkey Ctrl+Shift+B)
Clone this repository to a folder, then navigate in command line to that folder. Then run this command to build a stand alone executable file:
donet publish -c Release -r win-x64 --self-contained true
The above assumes windows, for other platforms replace win-x64 with:
- linux:
linux-x64 - macos intel:
osx-x64 - macos apple:
osx-arm64
If you don't already have a Twitch application:
- Go to the Twitch Developer Console
- Click "Register your Application"
- Enter a unique name for your Applcation
- Use
http://localhostfor the OAuthRedirect URL - Set Category to
Game Integration - Select Public as the Client Type
- Click Create
- Click manage on the application you just made
- Copy down the Client ID
If you do have a Twitch application:
- Go to the Twitch Developer Console
- Click manage on your application
- Copy down the Client ID
Run the application and follow the prompts on screen.