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
Get MessageId from WebHook
Tags: webhooks
Jan 18, 2018 at 9:16am   •   2 replies  •  0 likes
matt-spinks

We are in the process of integrating web hook functionality so our app will have NRT (near-real-time) displaying of data. We have the mechanism set up, and are receiving event notifications. However, when we receive a notification for a new voicemail message, I receive the following:

{   "uuid": "788125201093500980",   "event": "/restapi/v1.0/account/134636004/extension/134636004/message-store",   "timestamp": "2018-01-18T16:53:59.486Z",   "subscriptionId": "0e677729-95ec-4ad6-9bd3-a00213ab2981",   "ownerId": "134636004",   "body": {    "extensionId": 134636004,    "lastUpdated": "2018-01-18T16:53:47.713+0000",    "changes": [{     "type": "VoiceMail",     "newCount": 1,     "updatedCount": 0    }]   }  }


It's just a notification that there is/are new message(s) in the store. As far as I can tell, there is no indicator for the actual new MessageId in the store. With only this information, I have to query the message store for the latest messages, and compare them to messages we have already logged in our system in order to get the new one. This seems to defeat the purpose of using WebHooks. I could just as easily use a frequent polling method to get the latest messages from the message store without WebHooks, and get similar NRT results.


Am I missing something here? I see that call log notifications use something similar, but they have a SessionId, and I can query from the call log store using that SessionId to get my call info.


Is there a separate event filter I can subscribe to in order to get the message id of new messages? Or is there something similar to the session id that I can use with messages, in order to get only the new message?


Or, is this just the way it is?


Thanks

2 Answers
answered on Jan 22, 2018 at 7:57am  
Hi Matt,

While there is no dedicated notification event for VoiceMail, can you try a workaround solution below to see if it helps.

Register for both message-store and missed-calls event
var eventFilters = []
eventFilters.push('/restapi/v1.0/account/~/extension/~/message-store')
eventFilters.push('/restapi/v1.0/account/~/extension/~/missed-calls')
You will receive 2 notifications. One for a missed call event and another one for a new message event. You can use the sessionId from the missed call event to fetch the info of the voicemail in this case. Please try and let me know.

Bests,
Phong Vu

 0
answered on Jan 18, 2018 at 12:37pm  
Matt, unfortunately we don't have instant voicemail notifications (only SMS instant notifications are supported) at the moment but plan to implement them in the future (Q2-2018 is the earliest I assume).

 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