Without relying on the chat notification, what would be the best way to go about polling subs?

The title basically says it all. What would the best way to pretty much “duplicate” the subscription list into a own database? What i’ve done so far was a combo of chat + re-polling the whole subscriptions endpoint into my database, this though seems like a bad solution to me because subscriptions get skipped whenever the chat connection is lost / chat is bugging / down. On the other hand, polling the subscriptions api ever couple minutes would cause for a huge delay between the notification and the actual subscription (unless im able to poll it like every minute).

Lets say i would switch to api only and some script polling all subs every 1-2 minutes (Dont know the time its cached since its not documented), whats the exact time a sub lasts? My main problem is, the only field available in the subscriptions api is the created_at field for the subscription, whats the exact difference there is for auto-resubs? I guess its 30 days, aka 29d 23h 59m 59s, but thats not documented either so maybe @TwitchAlerts could elaborate here, or somebody else that has info on it.


I worked a bit on this. I assumed that a subscription lasts 30 days but thats wrong apparently. Some guy on our stream has re-subbed today (22.03.2015 23:20, chat announced). His first subscription was on 2014-09-14T20:58:00Z (API, auto re-sub apparently). So when dividing those two dates, a subscription seems to last 31.5136449 days. Am i seeing something wrong here? … Because obviously, when couning up days from his first subscription, i end up with his last subscription being on the 13.03.2015 21:58

Hi Kinsi,

Subscriptions are not set in stone, which is why we highly advise you not to build your own twitchnotify type of extension based on exact renewal time guesses. They are highly affected by external payment provider services such as paypal, which callbacks can be hours, or potentially even a day late. In addition to this, the time differential for when a sub payment is authorized and processed, and when the chat message is displayed to clients may not be specific time accurate. We strive to make these as accurate as possible within rules that payment providers can allow for, but we are not able to say with 100% accuracy that all subs are processed exactly in 30 days.

Hope that helps.


Thanks for your reply.

My only problem is that i need to be able to recognize re-subs. For manual re-subs thats no problem ofc., but for automatic ones it, apparently is. I dont really want to rely on the twitchnotify IRC. If my bot should lose connection, twitch chat should go down or whatever the case might be, that would be a missed sub and potentially a mad viewer. So even for the case that twitch might be down, using the API would fix things as soon as possible, while i cant really “retrieve” past twitchnotify messages. Somehow it has to be possible, i hope, twitchalerts and all others somehow are able, which is why im asking that. The easiest way to go about this would ofc to add a updated_at field for the subscription itself besides the created_at one, which always updates whenever a automatic re-sub happens, like suggested in this thread Re-payment notification for subs, which got no official answers though so i dont know whats up with that.

We do not support polling the full subscriber list very often. I’m sorry if that breaks your plans for a database of sorts, but it isn’t supported. You can poll it intermittently as you mentioned, and the broadcaster can pull a raw CSV to rectify any data).

I’d recommend opening a issue on github as a feature request if you’d like resubs to be denoted there, but that is not /currently/ supported in any fashion other than chat.

Ill do that then and try to get in contact w/ @TwitchAlerts, really curious how he managed to do it.

Do you by chance know the exact limit of how often i can poll it? Paginating trough it with one minute delay in between worked, at least it didnt throw me limitation error or ban me even.


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