我有一个松散的机器人,我使用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"
}
]
}
]
答案 0 :(得分:1)
现在排序了。实际上我使用了错误的令牌,测试令牌,必须使用通过应用程序的OAuth流程获得的机器人访问令牌或用户访问令牌。