Webhook Topic: Subscription Events hub.lease_seconds

When I subscribe to the webhook topic “Subscription Events” I only get a webhook subscription which is valid for about 4:40h.
The parameter hub.lease_seconds which I tried to use with a value from anything between 172800 and 864000 doesn’t affect the expiration date/time of the webhook subscription at all.
When I change the value on other topics like “User Follows” it works absolutely fine although.

Does anybody know this problem or is able to reproduce it?

User OAuth tokens only last ~4 hours, so the lease can’t be more than the life of the OAuth token used.

You’ll need to recreate the subscription each time you renew your user access token.

1 Like

And for clarity:

The hub will accept your lease and check the token lifetime left and apply the shorter of the two whichever that maybe.

Like you could ask for a one hour lease time with a four hour token and get a subscription for one hour.

And conversely the behaviour you have observed.

Ask for 10 days but only get 4 hours as thats all that is left on the token.

1 Like

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