cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1270
Views
1
Helpful
4
Replies

Webex Bot getting permission denied on GET to list messages

tylwest
Cisco Employee
Cisco Employee

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!

 

1 Accepted Solution

tylwest
Cisco Employee
Cisco Employee

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!

View solution in original post

4 Replies 4

tylwest
Cisco Employee
Cisco Employee

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!

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)

Jeff Marshall
Cisco Employee
Cisco Employee

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

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.