Slack 机器人互动消息。显示“哦,不,出了点问题。请重试。”单击按钮

问题描述 投票:0回答:2

我有一个 Slack 机器人,我使用 Slack 应用程序的开发人员帐户在 chat.postMessage() 上使用测试器发送结构化消息。

消息发送顺利,但是当单击按钮时,它显示 - “哦,不,出了点问题。请再试一次。”在聊天窗口中,但交互式消息请求 URL 上未收到任何信息。

我不知道发生了什么,任何帮助将不胜感激。

留言附件

[
    {
        "title": "The Further Adventures of Slackbot",
        "fields": [
            {
                "title": "Volume",
                "value": "1",
                "short": true
            },
            {
                "title": "Issue",
                "value": "3",
                "short": true
            }
        ],
        "author_name": "Stanford S. Strickland",
        "author_icon": "http://a.slack-edge.com/7f18/img/api/homepage_custom_integrations-2x.png",
        "image_url": "http://i.imgur.com/OJkaVOI.jpg?1"
    },
    {
        "title": "Synopsis",
        "text": "After @episod pushed exciting changes to a devious new branch back in Issue 1, Slackbot notifies @don about an unexpected deploy..."
    },
    {
        "fallback": "Would you recommend it to customers?",
        "title": "Would you recommend it to customers?",
        "callback_id": "comic_1234_xyz",
        "color": "#3AA3E3",
        "attachment_type": "default",
        "actions": [
            {
                "name": "recommend",
                "text": "Recommend",
                "type": "button",
                "value": "recommend"
            },
            {
                "name": "no",
                "text": "No",
                "type": "button",
                "value": "bad"
            }
        ]
    }
]
slack-api slack
2个回答
1
投票

现在已经排序了。实际上,我使用了错误的令牌、测试令牌,其中必须使用通过应用程序的 OAuth 流程获取的机器人访问令牌或用户访问令牌。


0
投票

您在哪里使用令牌?我使用 slackSend() 插件从 Jenkins 发送消息,当传递用户令牌或机器人令牌时,它会抛出一些错误并且不发送消息,任何人对此都有任何想法

© www.soinside.com 2019 - 2024. All rights reserved.