• 如何在Zoom中集成自己的app?一个简单的例子


    一、注册zoom 账号、以便在zoom app maketplace创建app。

    二、安装git、node.js、vscode开发环境(略)。

    三、注册ngrok账号,获得一个免费的https静态域名。

    四、配置zoom app(wxl),设置上一步获得的https静态域名,验证地址为/auth

    五、事件订阅(会议开始和会议结束,也可以订阅其它事件)

    六、选择在哪些界面使用app(wxl)、设置主页和允许访问的域名。

    七、设置访问范围

    八、生成共享app(wxl)的链接

    九、开始开发过程(power shell)

    1、git clone https://github.com/zoom/zoomapps-sample-js

    2、cd zoomapps-sample-js

    3、npm install

    4、配置.env(参数来源创建app的过程,SESSION_SECRET为随机初始化值)

    5、在app.js文件的95行-149行增加/webhook的处理(接收会议开始和结束事情的订阅信息)

    1. app.post('/webhook', (req, res) => {
    2. var response
    3. console.log(req.headers)
    4. console.log(req.body)
    5. // construct the message string
    6. const message = `v0:${req.headers['x-zm-request-timestamp']}:${JSON.stringify(req.body)}`
    7. const hashForVerify = crypto.createHmac('sha256', secretToken).update(message).digest('hex')
    8. // hash the message string with your Webhook Secret Token and prepend the version semantic
    9. const signature = `v0=${hashForVerify}`
    10. // you validating the request came from Zoom https://marketplace.zoom.us/docs/api-reference/webhook-reference#notification-structure
    11. if (req.headers['x-zm-signature'] === signature) {
    12. // Zoom validating you control the webhook endpoint https://marketplace.zoom.us/docs/api-reference/webhook-reference#validate-webhook-endpoint
    13. if(req.body.event === 'endpoint.url_validation') {
    14. const hashForValidate = crypto.createHmac('sha256', secretToken).update(req.body.payload.plainToken).digest('hex')
    15. response = {
    16. message: {
    17. plainToken: req.body.payload.plainToken,
    18. encryptedToken: hashForValidate
    19. },
    20. status: 200
    21. }
    22. console.log(response.message)
    23. res.status(response.status)
    24. res.json(response.message)
    25. } else {
    26. response = { message: 'Authorized request to Zoom Webhook sample.', status: 200 }
    27. console.log(response.message)
    28. res.status(response.status)
    29. res.json(response)
    30. // business logic here, example make API request to Zoom or 3rd party
    31. }
    32. } else {
    33. response = { message: 'Unauthorized request to Zoom Webhook sample.', status: 401 }
    34. console.log(response.message)
    35. res.status(response.status)
    36. res.json(response)
    37. }
    38. })

    6、npm start dev

    7、ngrok http --domain=shortly-adapted-akita.ngrok-free.app 3000  

    8、访问静态域名

    9、点击click here 安装app到zoom中

    10、允许后

    11、打开zoom应用,app(wxl)显示就在zoom窗口中了。

    12、点击开始视频会议,获得开始会议事件的订阅信息

    13、点击结束会议,获得结束会议事件订阅信息

  • 相关阅读:
    MongoBd 离线安装与管理
    Linux编译器-gcc/g++使用&函数库
    1.4 Apache Hadoop完全分布式集群搭建-hadoop-最全最完整的保姆级的java大数据学习资料
    com.lowagie:itext:jar:2.1.7.js9 was not found
    带看123456
    接口自动化测试_L3
    java计算机毕业设计基于springboo+vue的校园二手闲置物品租售平台管理系统
    微软不再允许Windows 11通过1@1.com绕过登录 但还有其他办法可以继续用
    linux解决报错 libstdc++.so.6: version GLIBCXX_3.4.30 not found
    什么是HTTP头部(HTTP headers)?
  • 原文地址:https://blog.csdn.net/wxl781227/article/details/140956644