Giter VIP home page Giter VIP logo

chat's Introduction

企业微信号


一.申请企业号

  1. 以个人邮箱申请就可以, 不通过企业认证的话,有200人的限制,一般足够用了

二.获取对接权限

  1. 获取corpid
  • 登录后,我的企业 ----> 企业信息 --> CorpID

  • 将 CorpID 配置到配置文件 config.conf 内 的 CorpID

  1. 开启回调模式获取key

    • 登录后,顶部菜单[企业应用] ----> 添加应用

    • 进入新添加的应用

    • 拿到 AgentId 和 Secret

    进入 [接收消息] 设置

    1. URL: 填写你服务器地址:端口/auth( 例如: http://yanjunhui.com:4567/auth )
    2. Token: 随机获取(这个发送信息用不到,可忽略)
    3. EncodingAESKey: 随机获取,就是我们在配置文件配置的 EncodingAESKey
  2. 使用微信关注企业号才可以从微信收到信息,否则只能从微信企业号 APP 中收到信息

完成以上步骤后, 即可使用OpenFalcon发送信息,发送格式与 sender 符合:

tos     微信用户名
content 信息内容

OpenFalcon+ 配置:

在falcon+的 im 配置, 注意是微信企业号内的用户名称, 而不是用户个人的个人微信号

修改配置文件 https://github.com/open-falcon/falcon-plus/blob/master/modules/alarm/cfg.example.json#L25

"api": {
	"im": "http://yanjunhui.com:4567/send",
        "sms": "http://127.0.0.1:10086/sms",
        "mail": "http://127.0.0.1:10086/mail",
        "dashboard": "http://127.0.0.1:8081",
        "plus_api":"http://127.0.0.1:8080",
        "plus_api_token": "used-by-alarm-in-server-side-and-disabled-by-set-to-blank"
    },

使用

  1. clone 文件 git clone https://www.github.com/yanjunhui/chat.git
  2. 打开目录 cd chat
  3. 启动 ./control.sh start
  4. 停止 ./control.sh stop
  5. 重启 ./control.sh restart
  6. 状态 ./control.sh status

chat's People

Contributors

yanjunhui avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.