News & Announcements User Community Developer Community

Welcome to the RingCentral Community

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

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
Outbound SMS subscription event and gathering specifics of the message sent
Tags: sdk
Mar 1, 2019 at 9:44am   •   2 replies  •  0 likes

I'm using the SMS subscription event and attempting to pull the details of outbound messages from the message store. This works fine if it's a single SMS, but if messages are being sent in relatively rapid succession (say three messages over the span of 25 seconds), I'm seeing the event looks like this

lastUpdated: '2019-03-01T16:45:32.899Z',

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

Trying to filter the message store by either the time stamp or the newCount ends up missing one (or more) of the messages. I could subtract a given value from the timestamp, but that then runs the risk of pulling in duplicated values.

Anyone with some insight into this?

2 Answers
answered on Mar 2, 2019 at 12:04pm  
Thanks Tyler! Is it intended behavior for messageType and direction parameters to throw invalid parameter errors with message sync when using a syncToken? Not a huge deal because I can just filter it after the API returns values, more curious. I'm able to reproduce this behavior using the tool on the ringcentral site here:

Edit: Perhaps I'm misunderstanding, but this is the response behavior I'm getting with the following endpoint. The 'test' values are the outgoing message values. I'm updating the syncToken value each time with the last value returned.


[[12:18:32.488]] [LOG]   test 67
[[12:18:32.489]] [LOG]   test 68
[[12:18:52.680]] [LOG]   test 67
[[12:18:52.684]] [LOG]   test 68
[[12:18:52.686]] [LOG]   test 69
[[12:19:12.487]] [LOG]   test 69
[[12:19:12.490]] [LOG]   test 70

answered on Mar 1, 2019 at 7:07pm  
You can keep a small cache in your program to remember the message IDs.  Then you can filter out duplicate by message id.

Or you can call sync messages:

Sync token can make sure you can get all and no duplicates:


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

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

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