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.
{ 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' }More information on the SMS Instant Message Event is available in the API Reference:
https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetInstantMessageEvent
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.
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