11-07-2023 01:11 PM
Anyone had success with using webhook to GET messages and filtering on mentionedPeople when the personID is the personID of a webex bot?
All attempts to create a webhook filtered using this >> mentionedPeople=Get2Finish@webex.bot failed with below error:
'Invalid value for filter: mentionedPeople')
Any guesses on what I might be doing wrong?
Solved! Go to Solution.
11-07-2023 02:23 PM - edited 11-07-2023 03:26 PM
Resolved:
dtibbe has just one part of the answer in that the ID starts with Y2lz...
What was missing was the key - you needs to use https://developer.webex.com/docs/api/v1/people/list-people to find the Bots personID
11-07-2023 02:11 PM - edited 11-07-2023 02:15 PM
Thank you for responding to my question!
First to clarify what is personID and BotID. This documentation on Bots goes into the difference between Bots and People states
- people have a personId
that must be resolved via /people, while bots have a Bot Id and a personId
.
- The Bot Id is shown in the apps page and is usually only known to the developer
- while the bot's personId
can be looked up via the bot's email address in /people.
From my Bot developer page, I see the Bot username has a email format XYZ@webex.bot and the BotID a long string that usually starts with Y2lz....
I have tried creating a webhook using (as below) both IDs and failed.
mentionedPeople=Get2Finish@webex.bot
mentionedPeople=Y2lzY......
I have been successful in creating a webhook when I have used a regular users personID which has narrowed down the issue to failure to when I use a Bot info in the filter.
11-07-2023 01:17 PM
You've provided the bot's email but you'd need to provide the person id as described at https://developer.webex.com/docs/api/v1/messages/list-messages
Person IDs usually starts with Y2lz...
11-07-2023 02:23 PM - edited 11-07-2023 03:26 PM
Resolved:
dtibbe has just one part of the answer in that the ID starts with Y2lz...
What was missing was the key - you needs to use https://developer.webex.com/docs/api/v1/people/list-people to find the Bots personID
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