Instructions and import code for tracking your maximum/high subscriber number on your YouTube channel
YouTube requires an API key to do this. Setting up this API key is free, but you can't make unlimited requests to the API. This quota is your own and separate from Streamer.bot.
Streamer.bot will hide the API key after you add it to the global variables and in the action history by default, but try to keep it safe so others don't use it.
If for any reason your API key gets shared, you can always delete the old one and create a new key on your same account.
-
Log into the Google Developers Console (You can use your YouTube account email OR you can also use a different account email if needed/desired)
-
Choose your country and agree to terms of service
-
Under
Enabled APIs & Services
selectCreate Project
-
Choose a project name (I called mine “MyApp”) and click
Create
-
Click
+ Enable APIs and Services
and scroll down to YouTube -
Click on
YouTube Data API v3
then clickENABLE
-
Click on
Credentials
and the+ Create Credentials
-
Then choose
API key
-
Then copy the API key and open Streamer.bot
-
In Streamer.bot click on
Variables
to open your global variables window -
Make sure you are on the "Persisted Globals" tab, right-click in the window and select
Add Variable
-
Type in
youtubeApiKey
and then paste the API key in the "Value" field and click "OK" and close the variable window
In Streamer.bot select the Import button from the top left menu.
Drag and drop the file or copy the text from the file and paste all the text into the Import String field.
There should be 3 actions and 1 Timed Action.
(If you have your bot account or a friend who is subbed to your channel, you may want to unsubscribe on that account before moving forward)
After importing you can go to the YouTube API Subscriber Count - Get Subscriber Count
action and right-click the "Test" trigger and test it
You should hear a "Ta-da" sound on the first time you run it (as long as you are using windows)
If you go to Action Queues
> Action History
and double-click the action you should also see your %youtubeSubRecord%
number with "0" for the %youtubePrevSubRecord%
Then if you would like to test, you can start the timer in Settings
> Timed Actions
and enable the High Subscriber Number Timer
After it is enabled, it will check your subscriber number every 10 seconds. If you have access to another account that was not subscribed when you first tested, you can subscribe using that account and check that the audio plays again with an updated %youtubeSubRecord%
number in the variables in the action history.
Then you can disable the timer so it doesn't use any more of your quota for now: