Hi, I'm creating a webhook to detect if someone from the team messaged the bot. It works when the bot sends a message to a person, but not the other way around.
The Webhook json details:
[id] => Y2lzY29zcGFyazovL3VzL1dFQkhPT0svMWVmMDNlZGQtMTRhOS00MTI1LTk1NjktOTFlMTgxNGQxYzk4
[name] => CNBot Message Created Webhook
[targetUrl] => https://research.tigweb.org/connectednorth/webex-integration/webhooks/manage-messages-created.html
[resource] => messages
[event] => created
[filter] => roomType=direct
[orgId] => Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi8zNTY1MGRmOS01ZTEwLTRhMzMtOTdiNS0yYjU0ZTJjNzQ1MDE
[createdBy] => Y2lzY29zcGFyazovL3VzL1BFT1BMRS85ZDVhNGY5My02ZDJiLTRjMzAtOGJjMi05MGZjNzIwNmNiNjA
[appId] => Y2lzY29zcGFyazovL3VzL0FQUExJQ0FUSU9OL0MzMmM4MDc3NDBjNmU3ZGYxMWRhZjE2ZjIyOGRmNjI4YmJjYTQ5YmE1MmZlY2JiMmM3ZDUxNWNiNGEwY2M5MWFh
[ownedBy] => creator
[status] => active
[created] => 2022-10-07T19:55:43.625Z
I created this webhook using the bot's token. I used the same parameters when I created a webhook on the developer page using my token, and it worked both ways.
The language code that I'm using to receive the webhook is php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$response = json_decode(file_get_contents('php://input'), true);
// email me the data
}