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
Company level message events
Tags: rest api
Aug 30, 2018 at 3:39pm   •   3 replies  •  0 likes
matt-spinks

I'm setting up an event handler to handle new message creation events for all extensions. I'm finding the documentation to not be as specific as I like:


https://developer.ringcentral.com/api-docs/latest/index.html#!#RefCreateSubscription


Specifically, I'm not sure if I can create a single subscription for message events from ALL extensions (WITHOUT using a super admin account). The message store api only allows for message extraction for individual extensions one at a time (without a super admin account). So I can only assume the message events work the same way. And if that is the case, that means that I have to create a separate subscription for each and every extension, correct?


Or, alternatively, can I subscribe to message events using a filter like this:


/restapi/v1.0/account/~/extension/~/message-store


without a super admin account?


My concern is this: If I have to create a separate subscription for each and every extension, what happens when the company adds new extensions? I don't see an event I can subscribe to for when new extensions are added. Which means I'm back to polling for new extensions. Hopefully I can avoid that. That's the point of the sub model.


And it would be just a whole lot easier if I can just create a single subscription for messages for the whole company.

3 Answers
answered on Aug 31, 2018 at 6:48am  
Matt, it is available and documented but now marked as "private" to limit the number of consumers. So it is just a matter of your scope of visibility. I am not sure about privileges. Since it is just reading I think any extension can subscribe to such events because any extension can read company directory (unless this permission is taken out by some custom role definition).  

 0
answered on Aug 30, 2018 at 6:34pm  
Thanks Anton. I'm a little hesitant about using an undocumented feature. Is there a reason it's undocumented? Do you not plan on making it available forever? Or will it get replaced with something else? Also, does this endpoint for extension changes require any special permissions, such as super admin privs? - Thanks

 0
answered on Aug 30, 2018 at 4:35pm  
Matt, unfortunately we do not support event filter which gives you message events for the whole company. You can include multiple filters which specify particular extension IDs. You can also subscribe to account change events to react on adding/deleting extensions and alter your subscription -- the filter is "/restapi/v1.0/account/{accountId}/extension". It is not a part of public API which is described in documentation today, but you may give it a try. Here is the example of event:

{     "timestamp": "2014-04-29T14:29:27.408+0000",     "subscriptionId": "a45645-0001-cc71-9de3-674476722",     "uuid": "b11c9430-9687-4498-b12b-3fcb470bfe04",     "event": "/restapi/v1.0/account/~/extension",       "body": { "extensions":[             {                "extensionId":"74953947939",              "eventType":"Delete"           },           {                "extensionId":"8798797945",              "eventType":"Create"           },           {                "extensionId":"8475874957",              "eventType":"Update"           }        ]     }  
}
Hope it helps.


 1



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