Question

Subscription for entire company presence data

  • 1 March 2018
  • 4 replies
  • 1740 views

I currently have set up a poll from RC to get the presence data every 20 seconds. Currently we are running into issues. I am moving over to polling RC once a day to get the initial data and then using subscription to get the rest of the data. I have read some blogs on here linked below. But I can't seem to find a way to subscribe to the entire companies presence data.


The reason for this is we have a KPI board that shows whos in the queue and whos not.


Currently in my program. I have the subscription set up like so:


'subscription.EventFilters.Add("/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true");'


I am logging in with a super admin username and password,


'login = await ringCentral.Authorize("16503514555", "", "xxxxxxx");'


but the subscription that it looks like it is creating is


'/restapi/v1.0/account/134091004/extension/134091004/presence?detailedTelephonyState=true'



Any help would be much appreciated.


Thank You

Andy



Blogs that relate:

https://devcommunity.ringcentral.com/ringcentraldev/topics/explain-subscription-api-presence-api?top...

https://devcommunity.ringcentral.com/ringcentraldev/topics/requesting-presence-for-all-extensions-al...


4 replies

Hi Andy,

Try to subscribe on Account Presence changes, i.e.
"/restapi/v1.0/account/~/presence?detailedTelephonyState=true"

In this case subscriober will receive notifications regarding presence changes for all User extensions on Account, if it has all required permissions. 

Thanks,
@Igor,
I have tried that and now in my subscribor isn't getting any notification events. 

The subscription did get created
"id": "1cb52a4e-0a2e-48ff-99ca-c611be377ee4", "creationTime": "2018-03-01T17:01:52.412Z", "status": "Active", "eventFilters": [ "/restapi/v1.0/account/134091004/presence?detailedTelephonyState=true" ],

But in my logs I am not getting any notes that there was a message notification.

I am using the latest C# SDK for this application also.

For permissions this application has 
- Edit Presence
- Read Accounts
- Read Call Log
- Read Messages
- Read Presence
- SMS
- Webhook Subscriptions

Thank You
Andy
Hi Andy,

I would like to see what is your account level. Can you login to your developer account at developer.ringcentral.com portal. Open the APU Reference page and search for Presence. Let me know what APIs do you see under the Presence group. 

+ Phong
@Paco,
I only see 2 a get and a put



Thank You
Andy

Reply