New Twitch API subscription expiration/renew

I cannot find any technical reference regarding how to handle the expiration and renewal of a subscription with the New Twitch API webhooks. My question is: Does Twitch send a request notification that the subscription has expired so I can handle the renewal process in my app? For instance, the OAuth refresh token renewal process can be handled nicely because you send a “WWW-Authenticate” header when our token has expired.

This is actually discussed in the W3 spec for WebSub which is how we power webhooks at Twitch. tl;dr subscribers manage their own subscriptions, so when the timer is running out on the subscription, simply send a new subscription request to get a new lease.

As Geardrops says as per the spec.

You know the lease you requested, so before the time runs out you should rerequest the subscription with the same lease time.

I for example have my least time set to 25 hours, but I request to extend my subscription after 24 hours

Thanks @geardrops and @BarryCarlyon. That’s what I initially figured I would do but just wanted to confirm that’s the recommended way :slight_smile:

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