intercom和微信个人号连接

intercom

intercom 一个客服平台

intercom 的几个网址

前端js接入的例子

<html>
    <head>
    </head>
    <body>
        <script>
          window.intercomSettings = {
            app_id: "lalala",
            name: "test", // Full name
            email: "[email protected]", // Email address
            created_at: 1527337585129, // Signup Date
          };
        </script>
        <script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/cfwewwk3';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
    </body>
</html>

intercom dashboard 设置

  • 生成 access token(scopes 全都选一下吧)
  • webhook: http://118.25.106.132:9000/intercom
    secret(随意,只要保证和后面wechat intercom的配置一直就可以):123

测试:

$ curl \
-s https://api.intercom.io/users?user_id=27 \
-H 'Authorization:Bearer access_token' \
-H 'Accept:application/json'

intercom 和微信个人号连接

使用 mojo 微信wechat_itercom
wechat_intercom
查看大图

.mojo weixin

sudo docker build -t mogo-weixin .
sudo  docker run -it  --env MOJO_WEIXIN_LOG_ENCODING=utf8 --env MOJO_WEIXIN_PLUGIN_OPENWX_POST_API=http://111.111.111.111:9000/wechat -p 3000:3000 -v /tmp:/tmp sjdy521/mojo-weixin

wechat itercom

HOST = '0.0.0.0'
PORT = 9000
WECHAT_API_BASE_URL = 'http://111.111.111.111:3000/openwx'
INTERCOM_ACCESS_TOKEN = 'NTERCOM_ACCESS_TOKEN'
INTERCOM_WEBHOOK_SECRET = 'INTERCOM_WEBHOOK_SECRET'
INTERCOM_BOT_USER_ID = 'lalala'
  • 运行:
sudo docker build -t intercom_wechat
sudo docker run -it -p 9000:9000 intercom_wechat

猜你喜欢

转载自blog.csdn.net/harryhare/article/details/80659680