首页 > 解决方案 > chat.postMessage 的问题 - channel_not_foud

问题描述

我正在尝试使用 postMessage 发送表单,但我在测试时收到错误 channel_not_found ,但当我的朋友测试它的工作时。

slackWeb.im.open({token: secrets.token, user: data.user}).then(res => {
                console.log(res)
                let msg = msgs.k
                msg.user = data.user
                msg.channel = res.channel.id
                console.log(res.channel.id)
                slackWeb.chat.postMessage(msg)
            })

代码和错误的图像

标签: node.jsslackslack-api

解决方案


你的密钥有channel:read权限吗?


推荐阅读