cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
573
Views
2
Helpful
3
Replies

facing issue with adding a user to webex space using API

ris989
Level 1
Level 1

Hello Team, I am trying to add a user using the below webex API to a webex space and getting the below error.

 

Error 404 not found

{ "message": "The requested resource could not be found.", "errors": [ { "description": "The requested resource could not be found." } ], "trackingId": "WEBEX-DEV-PORTAL_1091d22a-98de-49c7-b7a3-234bda8a8b70_6" }

 

https://developer.webex.com/docs/api/v1/memberships/create-a-membership#xd_co_f=MmFlMmM3YjktMWI0NC00YzJiLThmM2ItNjE1N2E5NjE4NjFm%7E



I dont think that the issue is with resources are not present rather it looks like I might not be having required access, kindly confirm do I need to be an admin to do this activity?



More details about the inputs I am giving



roomId:

1:) I have copied the room id from the webex URL of the team space. The trailing aplha numeric value after the https://web.webex.com/spaces/*****************************

2:) I have also tried copying an aplha numeric value which you get by copying space link from the webex app.



Email id

used team mate official mail id.



personId

extracted id from using the following api
https://webexapis.com/v1/people?email=test@example.com



I have also tried doing this from the local setup, I have added a Bot which I created and used its token to perform similar action and getting same issue. Kindly help

 

1 Accepted Solution

dstaudt
Cisco Employee
Cisco Employee

Note the UUID that is part of the Webex space link URL is not the same as the space's roomId.  They are related, for example:
Space roomId: Y2lzY29zcGFyazovL3VzL1JPT00vN2JmZjY1OTAtMThlOS0xMWU1LWE3NjEtYmIxMzFmODY2NjNl

Base64 decoded roomId: ciscospark://us/ROOM/7bff6590-18e9-11e5-a761-bb131f86663e

Webes space link URL: webexteams://im?space=7bff6590-18e9-11e5-a761-bb131f86663e

However, the transformation from URL to roomId (and vice versa) is not documented/predictable (e.g. the 'domain' part - here 'us' - may be different depending on region), and using one as the basis for the other is not recommended/supported.  You will need to use the Webex REST APIs to retrieve the actual roomId for the space to use in API operations, e.g. via GET /rooms.
Also note that the Bearer token of the user making the REST API request will need to be a member of the target space (and be a moderator, if it's a moderated space) in order to create a membership.

View solution in original post

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

Note the UUID that is part of the Webex space link URL is not the same as the space's roomId.  They are related, for example:
Space roomId: Y2lzY29zcGFyazovL3VzL1JPT00vN2JmZjY1OTAtMThlOS0xMWU1LWE3NjEtYmIxMzFmODY2NjNl

Base64 decoded roomId: ciscospark://us/ROOM/7bff6590-18e9-11e5-a761-bb131f86663e

Webes space link URL: webexteams://im?space=7bff6590-18e9-11e5-a761-bb131f86663e

However, the transformation from URL to roomId (and vice versa) is not documented/predictable (e.g. the 'domain' part - here 'us' - may be different depending on region), and using one as the basis for the other is not recommended/supported.  You will need to use the Webex REST APIs to retrieve the actual roomId for the space to use in API operations, e.g. via GET /rooms.
Also note that the Bearer token of the user making the REST API request will need to be a member of the target space (and be a moderator, if it's a moderated space) in order to create a membership.

Many many thanks @dstaudt , I wasted 4 hours yesterday figuring out this

Janos Benyovszki
Cisco Employee
Cisco Employee

@ris989 would you mind opening a support ticket for this - email to devsupport@webex.com ? It's easier to troubleshoot API issues that way. Thanks