09-15-2022 07:34 PM
Hey guys,
I have a bot that needs to link back to a webex space, so I'm just trying to find how to be able to generate a link to a space that is the same as when your right click -> copy space link. This will be for users already a part of that space, for ease of use.
I've had a look at the various API calls (rooms, messages, meetings), but can't see one returning the correct format? Meetings is close, but doesn't work.
Any advice?
Solved! Go to Solution.
09-16-2022 01:27 AM
There are a number of options that you can choose here, depending on what you want to do exactly and the development effort you can put into it. Let me detail them:
1. The easiest option probably is to use our Eurl bot. You can add this bot to your space and it will create a unique link that anyone can use to join that space. The bot would add the new users. If it's a moderated space, you can add the bot as a moderator to the space and it will add users who use the link.
2. This would require a bit more development effort. Webex space links that you get from the webex app look like this: webexteams://im?space=ab0ff6e0-f43e-11e8-91f7-47bdccd447fe . The ab0ff6e0-f43e-11e8-91f7-47bdccd447fe part is the space's backend ID. This is actually also provided by our APIs, specifically the /rooms APIs (room is another name for space), however the roomIDs you see in the API are base64 encoded and look like "Y2lzY29zcGFyazovL3VzL1JPT00vYWIwZmY2ZTAtZjQzZS0xMWU4LTkxZjctNDdiZGNjZDNkN2Zl". If you decode it, you get this: ciscospark://us/ROOM/ab0ff6e0-f43e-11e8-91f7-47bdccd447fe. Notice that you are getting the same backend ID for the space, "ab0ff6e0-f43e-11e8-91f7-47bdccd447fe". You can just use this and append it to "webexteams://im?space=" and you would get that space link in the same way the webex app has it.
3. This probably requires the most development effort but it would likely give you the most control on the functionality. You can just the /rooms APIs I mentioned above to manage everything related to spaces. And use the /memberships APIs to manage the rooms' members. You can have code logic for your bot that leverages these APIs to add/remove users to rooms, create join links (with your own code, leveraging the /create-a-memberships API) and much more.
Hope this helps but let us know in case of any queries.
09-16-2022 01:27 AM
There are a number of options that you can choose here, depending on what you want to do exactly and the development effort you can put into it. Let me detail them:
1. The easiest option probably is to use our Eurl bot. You can add this bot to your space and it will create a unique link that anyone can use to join that space. The bot would add the new users. If it's a moderated space, you can add the bot as a moderator to the space and it will add users who use the link.
2. This would require a bit more development effort. Webex space links that you get from the webex app look like this: webexteams://im?space=ab0ff6e0-f43e-11e8-91f7-47bdccd447fe . The ab0ff6e0-f43e-11e8-91f7-47bdccd447fe part is the space's backend ID. This is actually also provided by our APIs, specifically the /rooms APIs (room is another name for space), however the roomIDs you see in the API are base64 encoded and look like "Y2lzY29zcGFyazovL3VzL1JPT00vYWIwZmY2ZTAtZjQzZS0xMWU4LTkxZjctNDdiZGNjZDNkN2Zl". If you decode it, you get this: ciscospark://us/ROOM/ab0ff6e0-f43e-11e8-91f7-47bdccd447fe. Notice that you are getting the same backend ID for the space, "ab0ff6e0-f43e-11e8-91f7-47bdccd447fe". You can just use this and append it to "webexteams://im?space=" and you would get that space link in the same way the webex app has it.
3. This probably requires the most development effort but it would likely give you the most control on the functionality. You can just the /rooms APIs I mentioned above to manage everything related to spaces. And use the /memberships APIs to manage the rooms' members. You can have code logic for your bot that leverages these APIs to add/remove users to rooms, create join links (with your own code, leveraging the /create-a-memberships API) and much more.
Hope this helps but let us know in case of any queries.
09-18-2022 03:33 PM
Thanks Raffaele, #2 was exactly what I was after.
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