How to use a single webhook for multiple messenger apps/bots?

余生长醉 提交于 2019-12-02 01:35:07

You can use the exact same webhook, same port and all, for multiple facebook messenger bots. Each payload of messaging events sent to your webhook will be sorted into a list of pages that the messages are for. You can write code to handle each page's payload differently after it has hit your webhook.

My error was to add the port number after "/webhook" while the port number should go after the ip address "https://mydomain". In case anyone else was wondering, yes you can use the same webhook for different messenger apps, just use different ports.

You can receive your response in 443 and then redirect to your specified port by using proxy pass in your server's conf.

    server {
    listen 443;
    server_name mydomain/webhook2;

    location /{
         proxy_pass http://127.0.0.1:yourportname;
         }
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!