05-28-2024 03:04 AM
Hey there,
We like to build a wallboard like application to show all people within a webex teams organisation. Therefore we need to somehow subscribe to a presence websocket, to keep the state of each person updated.
I couldn't find any documentation on how to gather the presence information of all people within an organisation. As we don't use node.js nor java, there's no official SDK we could use. C# would be helpful but in the end, we just need a method to get notified, as soon as a presence state of a person in the organisation changes.
Are there any ideas how to do this in a "manual" way?
Are there official websockets to connect to? and are there some documentation on this?
It's possible to reverse engineer the sample projects from the github repositories but it would be easier, if there is an official way to make progress on this.
Thanks
Solved! Go to Solution.
05-28-2024 04:02 AM
Thanks for the quick answer.
Polling isn't actually an option.
So you mean there's no official websocket, because there must be one when I look at the sample code provided for node.js.
But thanks anyway
Best regards
Christian
05-28-2024 06:09 AM
@thomc thanks. Apparently the old internal presence plugin in the JS SDK is now public: https://github.com/webex/webex-js-sdk/blob/next/packages/%40webex/plugin-presence/src/presence.ts . Sorry, I was still under the impression that it is internal as it was for many years, that's why I did not recommend it. But now that it's public, feel free to use it.
It can be used for getting updates on user statuses, but it's only designed for one user at a time. Setting up a listener for every user in your org might be too much, if done individually, so what I could recommend is maybe showing / pinning certain users (you could limit it to a certain number, like 5-10) and create presence websockets for those users in your app.
05-28-2024 04:23 AM
@thomc not aware of an official websocket for presence, but if you post here the sample code you mentioned, I can see if I find something. Thanks
05-28-2024 05:41 AM
Hey Janos,
This is what I've found so far:
https://webex.github.io/webex-js-sdk/samples/browser-plugin-presence/
There are some other examples as well but I guess this is the most promising.
Best Regards
Christian
05-28-2024 03:36 AM
@thomc we do not have a webhook or websocket for presence status, but you could query the people API for the same in a regular interval https://developer.webex.com/docs/api/v1/people/list-people .
05-28-2024 04:02 AM
Thanks for the quick answer.
Polling isn't actually an option.
So you mean there's no official websocket, because there must be one when I look at the sample code provided for node.js.
But thanks anyway
Best regards
Christian
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide