【问题标题】:Slack Bot Interactive Message. Showing "Oh no, something went wrong. Please try that again." on button clickSlack Bot 交互式消息。显示“哦,不,出了点问题。请再试一次。”点击按钮
【发布时间】:2018-02-05 18:16:28
【问题描述】:

我有一个 Slack 机器人,我正在使用 Tester 在 chat.postMessage() 上使用 Slack App 的开发人员帐户发送结构化消息。

消息可以顺利发送,但是单击按钮时会显示- “哦,不,出了点问题。请再试一次。”在聊天窗口中,并且在交互式消息请求 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 应用中是否启用了交互式按钮,并且它是否指向您的脚本。
  • 嘿埃里克卡尔科肯!感谢您的回复。
  • 朋友们好,现在整理好了。实际上我使用了错误的令牌,测试令牌,其中必须使用通过应用程序的 OAuth 流程获得的机器人访问令牌或用户访问令牌。
  • @SagarGalande 请将此添加为答案-然后您可以接受自己的答案以将其标记为已解决:)

标签: slack-api slack


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多