cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
307
Views
0
Helpful
3
Replies

Webex Bot List Messages

cdeoghar
Cisco Employee
Cisco Employee

I have a webex bot that we use to send periodic updates on some jobs. i want to retrieve the messages sent by that specific bot in my webex space. I checked the documents and it seems i can only retrieve the @

@

Is it possible to fetch the messages that the bot has sent.

Thanks.

3 Replies 3

sandiban
Cisco Employee
Cisco Employee

Hi @cdeoghar,

Thanks for checking with Webex Developer Support!
So, you need to use the "?mentionedPeople=me" (Doc. link - https://developer.webex.com/docs/api/guides/bots#differences-between-bots-and-people) for the Bot to check who all send the messages to the Bot. Because using the Bot token, you can only fetch the messages (basically the RECEIVED messages by the Bot) in a space sent by others where they've mentioned the Bot's name. 

But if you want to figure out the SENT messages that Bot sent to a space, there is no restrictions or, not any such specific filters you need to use in the API payload.
It can anyway fetch the messages which are sent by the Bot, itself with the Bot's token.

Hope this helps!
Please let us know for any further details.

Regards!
Sandip

Hi @sandiban 

please share the steps as the basic api call is not providing suitable response.

cdeoghar_0-1744363723922.png

 

Hi @cdeoghar,
Thanks for your patience so far!
So I checked this internally and I realize due to enhanced security measures now, even Bot can't read the messages anymore sent by itself.
It can only read the messages where the Bot is mentioned (like when someone send the messages to the Bot by mentioning its name) and if you need to read the messages sent by the Bot (though its a very odd way to do it) as well, then hard-code the Bot's name in the Bot's reply using the "markdown" request parameter /create-a-message API.

So in the "markdown" request parameter of the /create-a-message API, you can do some thing like this <@personEmail:YOUR_BOT@webex.bot| > so the @ mention is not obvious unless the users mouse over the area where that space character is present. But again, this might look quite odd though to implement.
Let us know for any further assistance or, queries.

Regards!
Sandip