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
Sending SMS Status Changes and SMS Inbound
Tags: rest api, sending sms, subscription
Feb 13, 2023 at 4:20pm   •   2 replies  •  0 likes
Matthew Skilton

Is there a way to get notifications of status changes of outbound SMS. As in we have sent an SMS through the API.. can we subscride to a status change event, becuase initially what you get when yuou create the message is 'Queued' is there a way to register (subscribe) to an event/notification that lets you know that the message sent. Looking at the Notifications Types, is it to do with Message Event? as in I would have to subscribe to /restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store?type=SMS&direction=Outbound

to receive status changes on sent messages? would that be correct.

and for Inbound SMS the event is

/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS

I'm confused as to why inbound SMS wouldn't just be (whats the difference between Message Event and Instant Message Event?)

/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store?type=SMS&direction=Inbound

and ultimately if I would like to subscribe to any Outbound SMS status changes and any Inbound SMS, can I just do one subscription and 2 event Filters? something like


POST .../restapi/v1.0/subscription
{
"eventFilters": [

"/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store?type=SMS&direction=Inbound",

"/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store?type=SMS&direction=Outbound",

],
"deliveryMode": {
"transportType": "WebHook"
}
}


2 Answers
answered on Feb 23, 2023 at 2:41pm  
  • Appointment Reminder

 0
answered on Feb 23, 2023 at 1:10pm  

How long do apps typically take to get approved? We've been waiting a few days. Any chance of helping us to get it moving along :) Would like to get some real users up and running.

Thanks!



 0
on Feb 23, 2023 at 2:15pm   •  0 likes

App client id or app name?

on Feb 23, 2023 at 2:41pm   •  0 likes
  • Appointment Reminder
on Feb 23, 2023 at 3:18pm   •  0 likes

Approved!

on Feb 23, 2023 at 5:41pm   •  0 likes

Thank you!

on Mar 3, 2023 at 7:57am   •  0 likes

Hei Matt,

You app is a public app and named Appointment reminder. Do you want to check with this customer who is looking for an appointment reminder to see if your app is a fit for his needs.

on Mar 3, 2023 at 8:55am   •  0 likes

Thank you. Have replied! Are you able to help us get listed in your App Marketplace? I have added in the info in the developer console a few weeks ago but nothing has progressed. Thanks!

on Mar 3, 2023 at 10:11am   •  0 likes

Thanks for replying to the customer question about appointment reminder! I see your request for app gallery listing request. I am not responsible for approving it. But I will ask my colleague to speed up (today is a day off in RingCentral though :( ).

I also want to see a demo of your integration so that I can help you better to reach out to more potential customers. Are you willing to jump on a call some time next week so we can talk more about this?

on Mar 3, 2023 at 10:53am   •  0 likes

Absolutely. Can email matthew@appointmentreminder.com for contact info.

answered on Feb 13, 2023 at 7:02pm  

The event is for getting notified when something has changed in the user message store such as an inbound message readStatus is set "Read", a message is deleted, an outbound message messageStatus is changed etc. You will only get the message id in the payload and you will have to call the message store using the id to get the changed value.

While the /instant?type=SMS is purely for receiving inbound text message with the text and other properties of the message.


 0
on Feb 13, 2023 at 7:37pm   •  0 likes

I don't mind too much that the message-store event type just returns the Message id,

I can then make a call to get the full details, but I can't see any mention of a message id in the docs here :

Office API Reference | RingCentral Developers


So I'm a bit confused, just seems to return counts? not message ids?

It has uuid notificationId/ownerId/subscriptionId/accountid/extensionid but no mention of messageId/s

on Feb 13, 2023 at 9:12pm   •  0 likes

A sample of a new message change to the message store

{
  "uuid": "3899647630666415164",
  "event": "/restapi/v1.0/account/80964xxxx/extension/6228832xxxx/message-store",
  "timestamp": "2023-02-14T05:09:15.241Z",
  "subscriptionId": "5a1075c5-6a20-47de-aec2-f88c47688958",
  "ownerId": "6228832xxxx",
  "body": {
    "accountId": 80964xxxx,
    "extensionId": 6228832xxxx,
    "lastUpdated": "2023-02-14T05:09:08.435Z",
    "changes": [
      {
        "type": "SMS",
        "newCount": 1,
        "updatedCount": 0,
        "newMessageIds": [
          1908413703016
        ]
      }
    ]
  }
}
on Feb 13, 2023 at 9:54pm   •  0 likes

wow so there is no mention of `newMessageIds` in the docs at all. Does that mean there is an `updateMessageIds` and `deletedMessageIds` array as well? Would be useful if the documentation actually explained this a bit better

on Feb 14, 2023 at 6:48am   •  0 likes

I think the message id was added some time ago. However, I just check and there is no message id(s) for updated count. So it's quite useless.

"changes":[{"type":"SMS","newCount":0,"updatedCount":3,"newMessageIds":[]}]
on Feb 14, 2023 at 10:39am   •  0 likes

right.. useless is right. Is there any plan to actually correct this API.. as in actually make it of some value.. because at the moment.. getting a webhook that 3 messages have updated but not which messages.. is completely pointless...


So in summary. There is presently no webhook that I can use to notify when an outbound SMS has changed status. The best I could do ATM is to poll for specific messages through the GetMessage endpoint

`/restapi/v1.0/account/accountId/extension/extensionId/message-store/messageId `

on Feb 14, 2023 at 6:31pm   •  0 likes

I checked with the team internally and they said that the missing of updatedMessageIds[] is expected due to a dependency on other parts of the platform.

So yes, very unfortunately, that we have to poll and check, which is not reliable and efficient.

Let me explore further with the team to see this can be improved in the future.



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