04-22-2022 04:45 AM
Hi Team, are there some issues with webex bot services now? I'm working on a bot and messages sent don't reach the bot. No POST messages received.
04-22-2022 04:46 AM
This sounds like an issue with your webhook. I presume you have a messages:created webhook, was this created with the bot token?
Also, is this in a 1:1 space with the bot or in a group space? If in a group space, the bot needs to be specifically mentioned in the message (@botname do something)
04-22-2022 05:04 AM - edited 04-22-2022 05:23 AM
The setup is
- webex bot service running locally on port 8080, bot configured with correct bot id and access token
- ngrok tunnel for exposing the bot /api/messages endpoint on port 80 and forwards requests to local port 8080
- webex 1:1 space with bot in chrome browser
One or two commands get through and I see then in ngrok Inspect. Then something breaks and no more messages reach localhost. If I do some dance refreshing webex teams page, swtiching to different space then sometimes it works again for couple messages.
How can I diagnose the cause of that problem?
Thank you for any suggestions.
04-22-2022 05:44 AM
Hard to say right now what could cause this. Is your webhook getting triggered for every message that's sent to the bot? Could you share the webhook JSON details?
Also, sometimes ngrok is a bit buggy when it comes to working with our webhooks. There is a workaround here: https://developer.webex.com/blog/webhook-delivery-issues-with-ngrok . It doesn't apply to all users, but some may be affected by this. You could try that workaround to see if it helps.
04-25-2022 12:49 AM
The walkaround for ngrok helped. Thank you. Overall the next day service behaved better. BTW is it correct do the development with real bot? Shouldn't I use some emulator to mockup real webex API?
04-25-2022 01:22 AM
Glad to hear it helped. Not sure what you mean when saying 'to do development with a real bot'. There should be no issue, bots created on developer.webex.com are all productive, whether used for testing only or actual productive usage is up to the developer themselves. Or if you mean the usage of ngrok for productive development, yes that would not be recommended. Ngrok should be used for testing only purposes. Real productive environments should have productive target URLs being used, ideally ones that can be managed by the developers.
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