Alert from 3rd party api/site


I am wondering if this is possible. I am doing a fundraiser that is all setup through . They do have what looks to be a good api with a lot of info here

I would like when a donation is made on my fundraising site I get an alert from Phantombot to pop up on my Twitch channel.

Any ideas if this can be done? I am still pretty new to Phantombot but loving all the features and flexibility it has!

I appreciate any help you can provide!



I might be looking in the wrong area but I don’t see anything where Classy sends an event out to a registered application.

IIRC, the way the existing APIs work (such as streamlabs, twitch, etc) is when an event occurs (such as a donation, a follow, sub, bit donation, so on) they send out said event to all the registered applications using their own API. PhantomBot just receives the event and handles it accordingly.

If Classy doesn’t have something like that, then donation notifications won’t be instant, as you will have to set up some form of a timer to hit the API every so often and retrieve the data. From there you have to parse it into your database in order to prevent duplicate alerts.

Long story short, it is entirely possible. But it will require a custom script at the minimal.


Great info, thank you! This will help me as I dig more into it.


I was able to have a friend help me out getting the scripts working. Classy has an interesting API in that they don’t have limited permissions and only give token access to organization admins. So we had to get a little creative.

We have a Python file making the request, then parses the JSON to find the donations, each donation ID is added to a text file once it’s parsed so it won’t repost old ones Then it formats the donation into a nice string and makes a post request to a php file, which on the server stores that text into a file. Finally the HTML makes a repeated request to get the contents of the file and puts it into the marquee div. So as of right now I can go to a web address and see scrolling text with the latest donator and amount.

My issue is with alerts. I am not quite sure where to go from here in Phantombot so when a new donation comes in Phantombot sends an alert to Twitch. I am pretty sure I am over thinking it and would love if anyone has some tips or a nudge in the correct direction.

Thanks for any help!


You can use a script to parse the information from your html page and any time the information differs it would send an alert.

I had one for a destiny command awhile back, and I believe you could use similar here.

	try {//
		var HttpRequest =;
		var HashMap =;
		var h = new HashMap(1);
		var r = HttpRequest.getData(HttpRequest.RequestType.GET, 'your url goes here.', '', h);
		if (r.success) {
			$.say(r.content);// This posts everything from the request to chat, you might have to do some stripping if you have html elements.
		} else {// the numbers before the messages are for tracking.
			if (r.httpCode == 0) {
				$.say('[1]Could not contact Server, please try again at a later time.');
			} else {
				$.say('[2]Could not contact Server, please try again at a later time.');
	} catch (e) {
		$.say('[3]Could not contact Server, please try again at a later time.');
		$.consoleLn(e.message);// prints whatever error you got to console.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.