How do I detect every subscription and renew?

Continuing the discussion from Subscriber api Question:

Kinsi, did you ever get a solid solution to this? I also need a reliable way to detect every subscription re-up, and would rather not hack around Twitch to get it.

Just noticed you did a follow up thread here:

Parse chat for TwitchNotify is the generally used method.

Which is unreliable if the user doesn’t click the button, or if your bot misses the message.

I just found another thread, this time where a bunch of people are asking for this very feature to be added to the API: Re-payment notification for subs

The user has to click the button though to fire the event because otherwise when would Twitch send an event? Another service (not mentioning names, not sure if that is allowed or not in these forums) can send an auto-renew list, which I believe they say runs at midnight (forgot which time zone), and that may not be good for your chat as it contains every re-subscription, which, could be tens, hundreds, perhaps thousands of entries. I am not sure why a bot would miss a PM though, as long as it captures all of the PMs and has them in a queue, wouldn’t it get processed in that queue?

If there was a wish list, I would really like to see what another service has with a websocket service that you just sit and listen on for any updates. It makes it very nice in the case of new and returning subscribers as you aren’t required to constantly hit a webservice but just listen on a socket for a JSON payload. I am sure that would be a hit to infrastructure and bandwidth, but not sure if it is any worse than people hammering the subscription API constantly.

Twitch shouldn’t have to send the event at all. I want to request the date of last renewal from the API. Then I can easily detect when the date has changed, and react appropriately.

To be clear, I understand that being pushed updates via IRC or a websocket is convenient for certain types of apps, but for my case, it is too risky. I need reliability way more than I need convenience. With the Twitch API, I will get an error when a request for new data fails, and I can log the error and just try the API again later. With a connection to the chat servers, if that connection goes down, I can log that the app was offline, but I have no way to know what messages I missed while it was offline.

Ah, so you need more than to just let folks know someone re-subscribed, you are trying to track people for whatever reason. beyond just subscriber counts and information for instant reporting purposes. I get ya.

The alternative to parsing chat is mathing the number of months from the created_at in the sub API. Which should suffice for non real time notify.

Of course the API doesn’t contain the number of months according to Twitch’s Math.

1 Like

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