2016-11-17 60 views
1

我有一个懒散的机器人,我使用开发人员账号为Slack App在chat.postMessage()上使用Tester发送结构化消息。Slack Bot互动消息。显示“哦,不,出了点问题,请再试一次。”点击按钮点击

消息得到发送顺利,但当按钮被点击时,它显示 - “哦,不,出了问题,请再试一次。”在聊天窗口中,没有收到交互式消息请求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" 
      } 
     ] 
    } 
] 
+1

检查您的Slack应用程序中是否启用了交互式按钮,并且它指向了您的脚本。 –

+0

嘿Erik Kalkoken!谢谢回复。 –

+3

嗨,朋友,它现在整理。实际上,我使用的是错误的令牌,测试令牌,必须使用通过应用程序的OAuth流获取的机器人访问令牌或用户访问令牌。 –

回答

0

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