Connect Squiso to Ko-fi
Squiso can listen to Ko-fi events (donations, subscriptions and shop orders) by utilizing Ko-fi's webhook API system. Here is a quick guide.
Squiso Webhook ID
This integration uses Squiso's Webhook system behind the scenes. This means that you need to first have a random unique Webhook ID in Squiso. All data will be linked to this ID.
Each time you refresh a page it auto-generates a new ID. This is okay, but it is important that you use the same ID everywhere in this quick guide.
Here is your unique (auto-generated) Webhook ID. Please keep this a secret, or someone else might send Webhook data do your Squiso application.
8a9c1f44-55ba-46e7-93f8-5d0ed1184312
Configure Ko-fi
In your Ko-fi API settings page, copy and paste this webhook URL.
https://kofi.squiso.com?wid=8a9c1f44-55ba-46e7-93f8-5d0ed1184312
Configure Squiso
This is a quick code example on how to listen on donations. More information can be found in the API and the examples page.
// This script example requires that you first configure your Ko-fi to send webhooks
// Read more here: https://www.squiso.com/integrations/kofi
squiso.setWebhookID("8a9c1f44-55ba-46e7-93f8-5d0ed1184312");
// Listen to all Kofi-donations
squiso.onKofiDonation((data) -> {
// Specify the TTS voice
// All voices can be found here: https://www.squiso.com/voices/
String voiceID = "y1whgzx7";
// Compose a TTS message
SquisoString ttsMessage = new SquisoString(data.getUsername() + " just donated " + data.getAmount() + " on Ko-Fi: " + data.getMessage());
// Speak the TTS
squiso.speak(voiceID, ttsMessage);
});