slack-api

How to fix missing scope error in Slack (rtm.connect) API?

江枫思渺然 提交于 2020-01-13 16:23:50
问题 When I try to use the rtm.connect method with own token, tester returns me a false response. URL : https://slack.com/api/rtm.connect?token=xoxp-532016xxxxx-53xxxxxx-536743xxxxxx-9211bedc4bfe9ddfexxxxxxxxxxxxxx&pretty=1 { "ok": false, "error": "missing_scope", "needed": "rtm:stream", "provided": "identify,incoming-webhook,channels:history,im:history,channels:read,im:read,team:read,users:read,users:read.email,users.profile:read,chat:write:user,files:write:user" } What am I missing in request?

Access Slack files from a slack bot

大城市里の小女人 提交于 2020-01-12 12:54:30
问题 I need a slack bot that's able to receive and save files send from slack chatrooms. The problem is: slack doesn't send file contents, but an array of links pointing to the file. Most of them, including download link are private and cannot be accessed via bot. It does send one public link, but that link points at the file preview, which does not have the file itself (here's an example). So the question is: how can I access uploaded files via bot? 回答1: You can access private URLs from your bot

Access Slack files from a slack bot

早过忘川 提交于 2020-01-12 12:52:50
问题 I need a slack bot that's able to receive and save files send from slack chatrooms. The problem is: slack doesn't send file contents, but an array of links pointing to the file. Most of them, including download link are private and cannot be accessed via bot. It does send one public link, but that link points at the file preview, which does not have the file itself (here's an example). So the question is: how can I access uploaded files via bot? 回答1: You can access private URLs from your bot

Access Slack files from a slack bot

亡梦爱人 提交于 2020-01-12 12:51:53
问题 I need a slack bot that's able to receive and save files send from slack chatrooms. The problem is: slack doesn't send file contents, but an array of links pointing to the file. Most of them, including download link are private and cannot be accessed via bot. It does send one public link, but that link points at the file preview, which does not have the file itself (here's an example). So the question is: how can I access uploaded files via bot? 回答1: You can access private URLs from your bot

Slack Attachment Width and Wrapping Issues

半世苍凉 提交于 2020-01-12 02:41:44
问题 I'm trying to use slack attachments to log application errors but the large fields like the stack trace are behaving weirdly. First, when using attachments the table seems to be fixed to some arbitrary width, is there anyway to change this so a wider value can be allowed? Otherwise 50+% of the slack window is blank, a complete waste. Using just text works fine, but there are a number of other smaller fields included that benefit from the field format. Also I'm having a problem with slack

How to allow a slack post uploaded via curl to be editable by others

谁说我不能喝 提交于 2020-01-11 11:32:14
问题 I am using this curl request to upload a file: curl -s -F file=@%s -F channels=%s -F initial_comment=%s -F token=%s https://slack.com/api/files.upload' The idea is to have the file uploaded to a slack channel by a pipeline and have someone else edit the file. I can't seem to find the flag to allow a file uploaded by this method to be available for edit by others 回答1: I did some research on files.upload and my result is that it is not possible to upload a file in a way that would make it

How to allow a slack post uploaded via curl to be editable by others

十年热恋 提交于 2020-01-11 11:32:06
问题 I am using this curl request to upload a file: curl -s -F file=@%s -F channels=%s -F initial_comment=%s -F token=%s https://slack.com/api/files.upload' The idea is to have the file uploaded to a slack channel by a pipeline and have someone else edit the file. I can't seem to find the flag to allow a file uploaded by this method to be available for edit by others 回答1: I did some research on files.upload and my result is that it is not possible to upload a file in a way that would make it

Slack API - rtm_connect error

廉价感情. 提交于 2020-01-06 07:31:47
问题 When attempting to use the Slack API (Real Time Messaging) I get what seems to be a certification error. Any ideas why this is happening? Would love to get some feedback to point me in the right direction. I am using python 2.7 and the code is hosted in a paid account at pythonanywhere. import os from slackclient import SlackClient verif_token = os.environ.get("MYTOKEN") slack_client = SlackClient(verif_token) slack_client.rtm_connect(with_team_state=False) Traceback (most recent call last):

Slack API - rtm_connect error

喜夏-厌秋 提交于 2020-01-06 07:31:14
问题 When attempting to use the Slack API (Real Time Messaging) I get what seems to be a certification error. Any ideas why this is happening? Would love to get some feedback to point me in the right direction. I am using python 2.7 and the code is hosted in a paid account at pythonanywhere. import os from slackclient import SlackClient verif_token = os.environ.get("MYTOKEN") slack_client = SlackClient(verif_token) slack_client.rtm_connect(with_team_state=False) Traceback (most recent call last):

Slack API “attachments” not showing

帅比萌擦擦* 提交于 2020-01-06 05:07:27
问题 Attachments aren't working in the following code and neither is the response_type showing as it should be. I've also tried using Python's Slack Client, but the exact same thing is happening. def send_message(channel_id, text): params = { "token" : token, "username" : "NEW BOT", "channel" : channel_id, "text" : text, "response_type": "ephemeral", "attachments": [{ "text":"This is some text" }] } headers = {'content-type': 'application/json'} slack_api = 'https://slack.com/api/chat.postMessage'