Can I subscript to other extension's SMS event?

  • 1
  • Question
  • Updated 3 weeks ago
I have an urgent question about subscript to SMS message-store event. If I am an administrator, can I subscript to other extension's SMS event so that I receive the SMS that belongs to their number?


I found the following two links about the present event, but I am just not sure about the SMS event and if it will work for the direct number of other extensions. 
https://devcommunity.ringcentral.com/ringcentraldev/topics/read-sms-message-on-another-account
https://devcommunity.ringcentral.com/ringcentraldev/topics/fyfygcftg


Can you please confirm?
Photo of Arnold Mo

Arnold Mo

  • 70 Points
  • sad

Posted 7 months ago

  • 1
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,894 Points 2k badge 2x thumb
Arnold,

in our current version of the product administrators don't have the access to users' messages including SMS. It means that it is impossible to get information about another user messages neither through regular REST call nor via subscription.

There is an enhancement request to implement permission-based access to other user messages but unfortunately I can't provide any estimates now when it will be approved and released.
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Is there any movement on this enhancement request? I currently have a need to archive all SMS in a CRM. It looks like in order to do this I need to iterate over each extension authorizing each request with the user's password. That would mean I need to store the passwords and hope I get notified if someone changes theirs :(
(Edited)
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Great! I'll give it a whirl. I was suspect as most everyone posting about this says it's not possible.
(Edited)
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Do you happen to know how I can get a list of all extensions using the C# api?
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Found it: var extensions = await _restClient.Restapi().Account("~").Extension().List();

I was using the Get() method which only returns a singe entity as opposed to List() which returns them all. Makes sense but a little awkward in how the methods are named. 
 
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
I was able to access all user's SMS messages successfully. Thanks for the help!
Photo of Will Jensen

Will Jensen

  • 152 Points 100 badge 2x thumb
Here is a snippet for anyone else needing to do this with the C# library:

 var extensions = await _restClient.Restapi().Account("~").Extension().List();

                foreach (var extension in extensions.records)

                {

                    var userExtension = _restClient.Restapi().Account().Extension(extension.id.ToString());

                    var messages = await userExtension.MessageStore().List(new {direction = "Inbound"});
//Do something with the user's messages

}