Skip to main content

Hi,


I am working through this page https://developers.ringcentral.com/guide/notifications/webhooks/creating-webhooks using python code, I have subscribed to telephone sessions and a reminder of when my subscription is about to expire so I can renew it (this is the plan).

However I don't know how long a subscription takes to expire so I can't work out when to request the reminder.


My filters look like this


    eventFilters = [
'/restapi/v1.0/subscription/~?threshold=86400&interval=3600',
'/restapi/v1.0/account/~/telephony/sessions'
]

The idea is to receive a reminder every hour when my subcription is due to expire in 24 hours.


I have not received an event yet and I was wondering if this works on the sandbox or if I need to use different threshold and interval parameters.


Ed

Did you set the "expiresIn" value when you created your subscription? If you did not, the default value is 7 days (604800 sec). I have never used the expiration notification to renew a subscription but I think it should work. Try to set the "expiresIs" value to 2 days and test your code again with the threshold=86400 (1 day)


Thanks. I checked with our support guy and he says the expiration is actually 20 years so there is no need to subscribe to that event. What I ended up doing is checking the subscription once a month and renewing it if I find it has expired. Not great, but better than nothing. I would have preferred to be notified so that I can then automatically trigger a renewal


Reply