使用Slack Bot调用民意调查

时间:2018-10-17 09:38:02

标签: python api automation slack-api

我正尝试通过Slacker API使用Slack僵尸程序调用民意调查。

bot = Slacker(<Bot User OAuth Access Token>)
bot.chat.command(channel=<channelID>, command='/poll', text='"posted?""1"')

我收到以下错误消息。

----> 1 bot.chat.command(channel=generalID,command='/poll',text='"?""1"')

/Users/<>/anaconda2/lib/python2.7/site-packages/slacker/__init__.pyc in command(self, channel, command, text)
    381                              'channel': channel,
    382                              'command': command,
--> 383                              'text': text
    384                          })
    385 

/Users/<>/anaconda2/lib/python2.7/site-packages/slacker/__init__.pyc in post(self, api, **kwargs)
    121         return self._request(
    122             self._session_post if self.session else requests.post,
--> 123             api, **kwargs
    124         )
    125 

/Users/<>/anaconda2/lib/python2.7/site-packages/slacker/__init__.pyc in _request(self, method, api, **kwargs)
     97         response = Response(response.text)
     98         if not response.successful:
---> 99             raise Error(response.error)
    100 
    101         return response

Error: missing_scope 

是否可以使用闲聊的Bot调用民意测验?我使用用户的OAuth访问令牌进行了尝试,但仍然有效。

0 个答案:

没有答案
相关问题