This serves as a foundation for the user to connect their Streamer.Bot client to the Tiltify API and create their own custom donation alerts and stream interactions for their charity events.
Tiltify Account - You will need an account in order to obtain a Client ID and Client Secret. Instructions to do this are in the Tiltify API documentation. You will need this in order to generate an Access Code for Streamer.Bot to communicate with the Tiltify API.
Note: When generating an oAuth application in Tiltify, a Redirect URI is not necessary for this code. It can be set as
Tiltify Campaign Public ID - This can be found on your campaign page under Setup > Information. The campaign must be published in order for the extension to function properly.
In Streamer.Bot click on the
Import button in the top menu. Drag the .sb file into the
Import String field.
If imported correctly, there should be the following:
- Tiltify - Access Code
- Tiltify - Recent Donation
- Tiltify - Recent Donation Alert
- Tiltify - Total Raised
- Tiltify - Access Code
The Tiltify account and campaign information (Client ID, Client Secret, & Public ID) should be entered in their respective sub-actions in the
Tiltify - Access Code action.
To ensure the Execute Code sub-actions in each action (
Tiltify - Access Code,
Tiltify - Recent Donation, &
Tiltify - Total Raised) have the correct references, click on the
Find Refs and
Save and Compile buttons.
A 2-second timer should be set as the trigger for the
Tiltify - Recent Donation. StreamerBot will the ping Tiltify API every 2 seconds for donation information.
Assuming all actions are enabled and the 2-second timer is set for the
Tiltify - Recent Donation action, StreamerBot will begin pinging the Tiltify API every 2 seconds for donation information. Every donation will have the following variables associated with it:
- donorName - Name assigned to the donation to the Tiltify campaign
- donorAmount - Donation amount (USD) made to the Tiltify campaign
- donationId - Unique identifier assigned by Tiltify to each donation
- donorComment - Message assigned to the donation made by the donor
For every ping, StreamerBot will perform a check if the new donationId matches the previousDonationId. If they are the same, no new donations have been made, but if they are different, the
Tiltify - Recent Donation Alert action will trigger. This is where you can add your own custom interactions and logic statements (see example below). After those sub-actions are performed, the previousDonationId will be updated to the most recent donationId and be used as a reference for the next ping.
The Access Code for the Tiltify API expires every 7200 seconds. If an expired code is used, C# code in the
Tiltify - Recent Donation action will detect an error and trigger the
Tiltify - Access Code action to generate a new Access Code and update the global variable accessCode for all actions to use.
Tiltify - Total Raised action is optional, but can be used to update the total amount raised for the charity campaign. Additional custom interactions and logic statements can be added here for milestone goals.
The following global variables will be generated and used in the Tiltify integration:
- accessToken_Tiltify- Access token generated from the Client ID and Client Secret. This is requried in order to pull information from the published Tiltify campaign. See Tiltify API Reference for more information.
- publicId_Tiltify - Unique identifier for the published Tiltify campaign. This can be accessed under the Setup tab of the campaign.
- previousDonationId_Tiltify - A unique donationId will be assigned to each donation by Tiltify. This information will be saved under this global variable and used as a reference check every time
Tiltify - Recent Donationis triggered. If donationId and previousDonationId_Tiltify match, then no new donations have been made and
Tiltify - Recent Donation Alertwill not be triggered.
- Tiltify API Reference - Intro | Tiltify
- It is important that the Client ID and Client Secret copied correctly in the
Tiltify - Access Tokenaction. If entered properly, an accessCode_Tiltify global variable will be generated with the Access Code provided by Tiltify.
Tiltify - Recent Donation Alertand moved the Set global variable subaction to the beginning to prevent the possibility of double alerts/infinite loop from occurring. Download file and images have been updated accordingly.