Twitch-Api sample
Using the Twitch API sample bundle
The twitch-api example bundle in samples/twitch-api
demonstrates the ability
to access the twitch API (kraken/helix). Here is a guide to how to get it
working.
Prerequisites
You will need a working nodecg-io
installation. If you have non yet take a
look at installation guide. You may need to
install this bundle, so take a look at the
“Try an included sample”-Guide. It
will also tell you how to log in and how to use the GUI.
You also need:
- A Twitch oAuth-Key
Note
If you don't have such a key yet, you can generate it on https://twitchtokengenerator.com/, select custom scope token and select the scopes you need. For this sample you don't need any additional scopes, so you can leave everything off.
Configure the Twitch API sample bundle
-
In NodeCG, create a new twitch-api service instance.
-
Enter your Twitch OAuth Key:
{ "oauthKey": "oauth:abcdef...." }
After entering it, click save.
-
Set the sample's (
twitch-api
) dependency to be the newly created service instance (of typetwitch-api
). -
Check the NodeCG logs:
You should see an error or a success message and you current username, how many people you follow and if you are currently streaming.