News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Webhook Subscription - How to clear one created by another user?
Tags: webhooks, subscription
Apr 13, 2022 at 8:50am   •   1 replies  •  0 likes
Alan Christensen

I have ended up with 2 subscriptions sending me webhook events. I don't know how to delete the old one.

The scenario:
User A ran the OAuth flow. My app is using that user for authentication. The app created a webhook subscription to /telephony/session events for some extensions.

Something happened to my refresh token. So User B logs into my app and runs the OAuth flow. So now my app is using an access token for User B. The app checks the subscriptions to make sure they are up to date. The app sees no subscriptions for User B so it creates a new subscription. At the same time the subscription from User A is still sending webhook events. Now my app is receiving duplicate events.

How do I delete the subscription for User A?

1 Answer
answered on Apr 13, 2022 at 9:51am  

Notification subscription is per user. In app scenario, you should authenticate the app with just one user (if possible, use password flow authentication). If not that, you can keep the subscription id in your database (possible with the owner) and user B will need to check if the subscription exists then don't create a new one. However, user B's access token cannot be used to renew user A's subscription. So make sure the subscription lives long enough without the need to renew it.

I have not try this but you can help test it and share your finding. Give user A and user B a super admin role and try to delete other's user subscription to see if works.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us