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
How to get the SMS message details from the subscription event
Tags: sms and text messaging, subscription
Nov 16, 2015 at 11:22am   •   6 replies  •  0 likes
main-line

So, i have a subscription event working with the message-store filter. I receive an event update object that tells me there are changes like this:


{ event: '/restapi/v1.0/account/~/extension/9999999999/message-store',

body:

{ lastUpdated: '2015-11-16T18:52:15.013+0000',

changes: [ { newCount: 1, updatedCount: 0, type: 'SMS' } ],

extensionId: 133949004 },

uuid: 'dee9a9cc-4aff-4bed-a544-a18beaa959e3',

timestamp: '2015-11-16T18:52:25.895Z' }

From this message, I don't see a way to reference the new SMS message. Do I need to get a whole page of the message store and pick the last [newCount] messages, or is there a cleaner way?


Many thanks in advance for your help.


6 Answers
answered on Aug 14, 2017 at 8:35am  
Thanks John for your answer. I'm trying to see, but I got this in event payload on webhook notifications is almost the same that the first post say:

{ event: '/restapi/v1.0/account/~/extension/9999999999/message-store',

  body: 

   { lastUpdated: '2015-11-16T18:52:15.013+0000',

     changes: [ { newCount: 1, updatedCount: 0, type: 'SMS' } ],

     extensionId: 133949004 },

  uuid: 'dee9a9cc-4aff-4bed-a544-a18beaa959e3',

  timestamp: '2015-11-16T18:52:25.895Z' }

 0
answered on Aug 11, 2017 at 11:48pm  
We added a new event filter option last year to support this. Both the message ID included and the entire SMS message details are included in the event payload so you may not need to make an API call at all.

More information on the SMS Instant Message Event is available in the API Reference:

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

 0
answered on Aug 11, 2017 at 4:55pm  
Any dev on this request? I cannot believe that you cannot include the message ID. This is a basic thing I think. 

 0
answered on Nov 17, 2015 at 1:32pm  
Our Team is working on filtering based on the telephony status. But, at the moment filtering based on the date/timestamp is the suggested approach to reference a new inbound message.

 0
answered on Nov 16, 2015 at 11:51am  
Thanks for the speedy reply, Anil.  So filtering based on the date/timestamp is the preferred method at the moment.  Any plans to introduce something similar to the detailedTelephonyState=true in the presence events?  

 0
answered on Nov 16, 2015 at 11:46am  
The subscription event on the message-store notifies on any changes in the event, for example when you receive a new incoming message or the outbound message.

But to reference the new message, you should be able to do so by making use of the message-store API and filtering it by the date/timestamp available from the Subscription event.


 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