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
Subscription -- SMS sometimes update vs new
Tags: sms and text messaging
Sep 13, 2019 at 1:11pm   •   2 replies  •  0 likes
KK

My web hook is being called every time a SMS is received or sent. However, sporadically new sent SMSs are flagged as updated as opposed to new, and thus do not contain a message id to reference. Is there logic to this? They are all new messages.

2 Answers
answered on Sep 18, 2019 at 12:00pm  

As per this below link:

https://forums.developers.ringcentral.com/questions/755/how-to-get-the-sms-message-details-from-the-subscr.html

"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
answered on Sep 16, 2019 at 4:48pm  

Are you using the /message-store filter?

You will get notified when you send a message out or receive a new message. You will also notified when a new message is read or mark as unread. Here is how the notification body looks like:


// when I receive the first message
{"accountId":37439510,"extensionId":1426275020,"lastUpdated":"2019-09-16T23:41:54.472Z","changes":[{"type":"SMS","newCount":1,"updatedCount":0,"newMessageIds":[1081360191020]}]}

// when receive the second message
{"accountId":37439510,"extensionId":1426275020,"lastUpdated":"2019-09-16T23:42:15.261Z","changes":[{"type":"SMS","newCount":1,"updatedCount":0,"newMessageIds":[1081360669020]}]}
// when I read both messages
{"accountId":37439510,"extensionId":1426275020,"lastUpdated":"2019-09-16T23:42:51.166Z","changes":[{"type":"SMS","newCount":0,"updatedCount":2,"newMessageIds":[]}]}

 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