cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
240
Views
0
Helpful
1
Replies

Webhook Only Triggers When Bot is Tagged,Unable to Monitor All message

shikhasr
Cisco Employee
Cisco Employee

Hello Webex Community,

I am trying to set up a webhook for a bot account to monitor all messages in a Webex space. My use case is to process every message posted in the space, regardless of whether the bot is tagged or mentioned.

Steps Taken:

  1. I created a webhook with the following details:

    • Resource: messages
    • Event: created
    • Filter: roomId=<room_id> (specific room ID is added to target a particular space)
  2. The webhook is successfully created, and I confirmed it points to my application's endpoint.

  3. The bot/service account was added to the target Webex space to ensure it can interact with the space.

Observed Behavior:

  • The webhook triggers only when the bot is mentioned (@BotName) in the space.
  • The webhook does not trigger for messages posted by other users in the space unless the bot is explicitly tagged.

Expected Behavior:

The webhook should trigger for all messages posted in the specified Webex space, regardless of whether the bot account is mentioned.

What I Tried:

  • Ensuring the correct roomId is specified in the webhook filter.
  • Using the event type all to attempt capturing all messages, but it didn’t resolve the issue.
  • Adding the bot account to the space as a member to ensure visibility of messages.

Questions:

  1. Is it possible for a bot or service account to trigger webhooks for all messages in a Webex space (not just those directed to the bot)?
  2. If not, is there a recommended alternative (e.g., service account, compliance officer role) to achieve this use case?
  3. Are there additional scopes or permissions required to allow the webhook to process all messages?

Additional Information:

  • The bot account uses an access token generated via an integration with the following scopes:
    • spark:messages_read
    • spark:rooms_read
  • The webhook works perfectly for messages where the bot is tagged or mentioned but not for other general messages in the space.

Any guidance or clarification on how to enable webhooks for all messages in space would be greatly appreciated.

Thank you in advance for your support!

1 Reply 1

Janos Benyovszki
Cisco Employee
Cisco Employee

@shikhasr the behaviour that you are describing is expected and it is already documented herehttps://developer.webex.com/docs/bots#differences-between-bots-and-people . Bots can only see messages in group spaces, where they are mentioned. There is no way around this. If you need access to all messages in a space, you would need to use an OAuth Integration https://developer.webex.com/docs/integrations .