Questions tagged [slack-api]

Slack is a real-time messaging, archiving and search tool for modern teams. Use this tag for programming questions related to the Slack API including the Web API, the RTM API and the Events API.

Slack is a real-time messaging, archiving and search tool for modern teams.

Use this tag for programming questions related to the Slack API including the Web API and the Events API.

Read more about the Slack API here.

2911 questions
27
votes
3 answers

Slack webhook - Which IPs should I open?

We want to use Slack Webhook (Outgoing Webhook) with an internal web service. Our company is behind a firewall, so outside connections must be whitelisted. It appears that Slack has multiple addresses it will send the API request from, and they…
Sahar Menashe
  • 1,945
  • 2
  • 18
  • 17
27
votes
4 answers

Access Slack files from a slack bot

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…
ddgd
  • 1,657
  • 1
  • 15
  • 25
26
votes
2 answers

How can I color part of Slack incoming-webhook messages?

I want to compose a python script which sends a color-formatted message to a configured slack channel. I managed to send sentences of plain texts to slack channels but I could not figure out how to confer part of the sentences colors that I want. I…
guldam
  • 359
  • 1
  • 3
  • 3
25
votes
4 answers

How to render tables in Slack

I have a slack application that responds with formatted data in mrkdwn but it would be nice to have the information presented in table form like so Am trying to implement this but cant quite find how to format this message. The only close solution…
Caleb Njiiri
  • 1,563
  • 1
  • 11
  • 20
25
votes
1 answer

Slack - how to post a link to network folder?

I'm using a webhook to post messages to Slack via PowerShell script and I'd like to include a link to a network folder. I was able to do it with however when the generated 'files' link is clicked nothing happens. Is…
Alex E
  • 735
  • 2
  • 7
  • 15
24
votes
4 answers

How to make slack api block kit take up the entire width of the slack window?

I'm creating a slackbot for some automatic notifications, and I received a request to make the notification take up the entire width of the slack window, which looks much cleaner. I'm finding that there appears to be a specified width that the…
T.j. Johnson
  • 241
  • 1
  • 2
  • 3
23
votes
3 answers

How can a slack bot find out its own id?

I am writing a slack bot that listens to all messages in a channel. His response should be vary based on whether the message mentions him or not. The problem is that I can not figure out how to "properly" find out bot's id. The bot is subscribed to…
BobK
  • 860
  • 6
  • 12
23
votes
2 answers

Execute slash command as slack bot

I'm writing a simple slack bot which should execute other slack commands upon being called. Everything is up and running, however the slack commands this bot issues don't seem to be executed. For instance my bot posts /giphy kitten every hour and…
ubuntudroid
  • 3,680
  • 6
  • 36
  • 60
23
votes
8 answers

Jenkins Slack integration

I want to use the Slack plugin in Jenkins to ping notifications to a Slack channel. Jenkins says success when I test the connection, but I don't receive any notifications in my Slack channel. Are there any known problems? How can I get Jenkins to…
Felix
  • 5,452
  • 12
  • 68
  • 163
22
votes
4 answers

Slack Incoming Web Hooks - Send message @channel

I am working with Slack API recently and my motive is to send a channel wide message at a certain time by calling a web hook provided by Slack Incoming Web hooks. I created a web hook and got code from Slack as below curl -X POST -H 'Content-type:…
balanv
  • 10,686
  • 27
  • 91
  • 137
22
votes
9 answers

How to get a slack user by email using users.info API?

I'm trying to use Slack's users.info API to retrieve users information, but I need to find users by email, is there a way to do that?
user2286400
21
votes
2 answers

slack bot scope missing while making api request

I have made a slack app in which I have a bot. I have selected channels:history, channels:read, channels:write under my permission scope, and also I have passed scopes "scope":"bot channel:history channel:read channel:write" while doing my oauth2…
saf1
  • 960
  • 3
  • 9
  • 21
21
votes
1 answer

Send a message in a channel "only visible to you"

I can not see in the slack API documentation the way for a bot to send a message in a channel that response to a user. The same way slackbot does reply when doing /help. Anyone can let me know if that is possible? Notice the "Only visible to you".…
mathk
  • 7,973
  • 6
  • 45
  • 74
20
votes
3 answers

Is there a way to upload a Markdown file as a Slack post?

Trying to figure out a way to upload a Markdown file to be a formatted post in a channel. Is there an API call to do this? The files.upload seems to only support Markdown raw upload.
kickingvegas
  • 409
  • 1
  • 3
  • 6
19
votes
5 answers

How to see everyone who is online on slack?

We use the communication tool Slack. It shows online and away users that I have had direct message conversations with recently in my left sidebar. I would like to see everyone who is currently online, all the online users on our slack server, in a…
Helena
  • 1,041
  • 2
  • 12
  • 24