I've been reading others trying to achieve the same as me, and was just hoping someone could confirm the correct approach. This is a multi-company application, so we're using oAuth to set up the webhook
1. Admin user signs into RingCentral through our oAuth call and gets a token (and i set up a method to keep a fresh token)
2. We read all extensions and set up a message-store webhook to get SMS for each extension (Do I need to set up separate incoming and outgoing events to capture messages moving in each direction?)
This much I can handle (I think), but it's maintaining this that I'm unsure of:
3. How do I set up a webhook to alert me of new extensions or removed extensions? Can someone point me to the endpoint docs for this?
4. If I did have such a webhook event, I assume I'm able to add a message-store webhook event to capture SMS of the newly-created extension using a token I've kept refreshed since the admin user initially gave access to the account?
4a. I'll need to use a 'get webhooks' method to see what extensions I have message-store events for to prevent duplicate events for the same extension- can someone point me to the right endpoint?
This all seems unnecessarily complicated to me. Is the above the right approach? Are there any plans to add a method that simplifies subscribing to all extensions at once (as with other provider's APIs eg. Dialpad)?