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
44
votes
11 answers

Sending JSON to Slack in a HTTP POST request

I'm trying to send a message using Slack's chat.postMessage API call. I have no problems encoding my test messages within HTTP GET, but I'm trying to achieve the same result with JSON in a HTTP POST request. I've been testing with both curl and…
Valentine
  • 567
  • 1
  • 4
  • 8
43
votes
3 answers

How do I send "@here" with the Slack API?

I know I can tag a user with <@U423DFDE|username> but I can't figure out how to tag @here
benwiz
  • 2,167
  • 3
  • 22
  • 33
40
votes
4 answers

How to access Junit test counts in Jenkins Pipeline project

I have just started with Jenkins My freestyle project used to report JUnit tests results in Slack like this MyJenkinsFreestyle - #79 Unstable after 4 min 59 sec (Open) Test Status: Passed: 2482, Failed: 13, Skipped: 62 Now I have moved the same…
vikramsjn
  • 1,013
  • 1
  • 10
  • 21
40
votes
2 answers

Slack - Show fullname of user instead of username

Is there a way that in slack, we can show fullname of a user in the channel user list, instead of just the username? Since we have multiple teams and not all the people are familiar with usernames that users pick from different teams, its really…
khan
  • 7,005
  • 15
  • 48
  • 70
39
votes
3 answers

How to avoid slack command timeout error?

I am working with slack command (python code is running behind this), it works fine, but this gives error This slash command experienced a problem: 'Timeout was reached' (error detail provided only to team owning command). How to avoid this ?
Vikas Saini
  • 1,124
  • 3
  • 11
  • 24
37
votes
8 answers

Slack: Retrieve all messages

I want to retrieve all the messages that were sent in my teams slack domain. Although, I'd prefer that the data be received in XML or JSON I am able to handle the data in just about any form. How can I retrieve all these messages? Is it possible?…
marcusshep
  • 1,916
  • 2
  • 18
  • 31
36
votes
5 answers

How to send direct messages to a user as app in app channel

How is it possible to send message in slack directly to the user, by user.id as application. this application has scope: bot,channels:write,emoji:read,users:read,users:read.email I find how to send message only as DM or by webhooks, but there is no…
Koloritnij
  • 1,167
  • 1
  • 8
  • 15
31
votes
3 answers

How to join a Slack channel as a Real Time Messaging bot user?

channels.join is not allowed for bot users. I would like my RTM-using bot to listen to channels other than the one listed in the bot integration page. I don't see a way to change the channels in the bot integration page: Is this just a limitation…
Dustin Wyatt
  • 4,046
  • 5
  • 31
  • 60
30
votes
6 answers

slash command "dispatch_failed"

I have went through creating the custom slash command configuration via slack and installed it on workspace. However when I run it I get this /testing failed with the error "dispatch_failed" I tried multiple workspaces but same issue. Anyone…
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
30
votes
1 answer

Slack Attachment Width and Wrapping Issues

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…
JWrightII
  • 942
  • 11
  • 26
30
votes
7 answers

Can we send message to user in slack using python script?

In a slack team, can we send a message to a user using python? I have seen various APIs, they offer message to channel, but not to a particular user. Can we do that?
Vikas Saini
  • 1,124
  • 3
  • 11
  • 24
29
votes
5 answers

Confirming AWS SNS Topic Subscription for Slack Webhook

I am integrating SNS and Slack. I have created a slack app with incoming webhook enabled. I have got the webhook URL. I created a subscription for a SNS Topic with HTTPS protocol and set the Endpoint the webhookURL. Now the subscription is…
Manoj Acharya
  • 1,331
  • 2
  • 15
  • 27
29
votes
4 answers

How can a Slack bot detect a direct message vs a message in a channel?

TL;DR: Via the Slack APIs, how can I differentiate between a message in a channel vs a direct message? I have a working Slack bot using the RTM API, let's call it Edi. And it works great as long as all commands start with "@edi"; e.g. "@edi help". …
Roger
  • 1,020
  • 1
  • 8
  • 13
29
votes
2 answers

Markdown doesn't work in attachments

I'm creating a Slack integration with the Slack API. I followed the documentation but the markdown formatting doesn't work on my attachments... Here is my response object: { response_type: "in_channel", text: "List:", attachments: [ { …
28
votes
5 answers

How can I get the FULL list of slack emoji through API?

I am using the slack API to get the full list of emoji, so that when I get a message, I will just replace :squirrel: with the icon. The method https://slack.com/api/emoji.list works like a charm, but returns 30 icons only. I think this is correct…
Ing. Luca Stucchi
  • 3,070
  • 6
  • 36
  • 58