03-13-2023 01:13 PM
I have a bot that is able to post messages successfully to a given roomId. I am also trying to retrieve a list of messages from the same roomId. I understand the bot is only able to see messages where it has been mentioned. I have created messages accordingly. But when I execute my GET I am getting 'permission denied'. I am doing this from a Python script, but I get the same even if I do it from the developer website.
I get a 403 Forbidden with the following response:
{
"message": "permission denied",
"trackingId": "WEBEX-DEV-PORTAL_obscured"
}
I am not entirely sure what I am doing wrong.
I am including the correct token for the bot, the roomId, and the mentionedPeople parameter of 'me'. My URL from the Python script is: https://webexapis.com/v1/messages?mentionedPeople=me&roomId=obscured_but_correct
Thanks for any assistance!
Solved! Go to Solution.
03-14-2023 11:22 AM
Update for anyone that has had this issue. Although a POST will work with the standard text room_ID extracted from the URL, GET requires a base64 encoded format. The format for encoding requires the entire text as follows:
ciscospark://us/ROOM/room_Id_from_URL
If you're doing a Python script you can use this for conversion.
import base64
base64.b64encode(b'ciscospark://us/ROOM/room_Id_from_URL').decode("utf-8")
Thanks dev support and hope this is helpful for anyone else!
03-14-2023 11:22 AM
Update for anyone that has had this issue. Although a POST will work with the standard text room_ID extracted from the URL, GET requires a base64 encoded format. The format for encoding requires the entire text as follows:
ciscospark://us/ROOM/room_Id_from_URL
If you're doing a Python script you can use this for conversion.
import base64
base64.b64encode(b'ciscospark://us/ROOM/room_Id_from_URL').decode("utf-8")
Thanks dev support and hope this is helpful for anyone else!
03-14-2023 11:31 AM
Ok, the URL encoding was not guessable from your sample.
You should always use the encoded format whenever there is any ID required, see https://developer.webex.com/docs/api/changelog#2022-april (April 28th)
03-14-2023 06:00 AM
We would need to the trackingId to be able to check logging. It may be better to open a support ticket by sending the details to devsupport@webex.com
03-14-2023 06:04 AM
Thanks Jeff. Thought I would try community first to see if anyone else had encountered this before opening a case. Will do so and supply all of the obscured details to support.
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