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
9
votes
1 answer

Slack Jenkins plugin not working

I'm running jenkins from a .bat file because I need some apps to be able to perform some service operations that otherwise, from the service, would be impossible to do. I have installed the jenkins plugin in Slack. Followed the instructions and go…
Fritjof Berggren
  • 3,178
  • 5
  • 35
  • 57
9
votes
3 answers

Is it possible to post to chat.postMessage as any user in a Slack team?

I'm building a Slack integration that is intended to modify some text and then post it to a Slack channel as though the user who triggered the command had said it. e.g. /makeFace disapproval @Ben 3:45pm ಠ_ಠ I ask for the client permission scope,…
Benjamin
  • 1,060
  • 11
  • 16
9
votes
1 answer

Alias an existing Slack command

I see plenty of documentation for making a custom Slack command, but I'm trying to alias an existing one. IE, we have the command /bluejeans to start a Bluejeans meeting, but because of an inside joke I'd love to alias that to also kick off through…
Alex
  • 2,555
  • 6
  • 30
  • 48
9
votes
1 answer

How can I add a configuration page for my slack app?

How can I add a configuration page for my slack app? example: asana has an add configuration button which leads to a page which we can use to then connect the slack user account with asana account
Prashanth
  • 1,252
  • 2
  • 13
  • 28
9
votes
2 answers

Only I can see my output from custom slash commands

I created a custom slash command in Slack. The backend code, not that it's important, is a Lambda function in Python in AWS. My problem is that when I enter the slash command, I am the only one who can see the message. Otherwise, it works…
Xanxir
  • 476
  • 1
  • 8
  • 13
8
votes
1 answer

How to make a Slack App/Bot post a code block (Python)

In Slack you're able to post as a user in a code block like in Stackoverflow like so As a posting user, you're able to do this by typing "```" it then changes your input box to one formatted for code. I need to get my Slack App/Bot to post a…
James Gove
  • 81
  • 1
  • 2
8
votes
1 answer

How do I notify users on Slack that aren't in the channel?

What we are trying to do I am working on automation which posts messages to a Slack channel using Incoming Webhooks on a custom Slack App. The messages mentions people. What works We can send a message just fine, it has formatted content, and…
hanzworld
  • 1,289
  • 1
  • 14
  • 22
8
votes
0 answers

Slack API files.upload without preview (or non-plaintext)

I've been fighting slack's files.upload API. Even if I insist the file should be any kind of format that isn't plain text, example: request.post({ url: 'https://slack.com/api/files.upload', formData: { token:…
Tiago
  • 1,984
  • 1
  • 21
  • 43
8
votes
1 answer

Attach meta data / custom data to slack messages sent through the API

I am developing a series of Slack apps for my workspace, and some of them are meant to interact with the content (messages) delivered by the other apps : extracting content IDs that may be referred to by other messages A concrete example : Suppose…
Cyril Duchon-Doris
  • 12,964
  • 9
  • 77
  • 164
8
votes
2 answers

How to add Slack message button to open direct chat with a user?

I have a Slack bot that needs to return a message that includes list of Slack users and a button to direct message each user. I want the engagement experience to stay consistent for the user. If the user is interacting with the bot via a desktop…
krsyoung
  • 1,171
  • 1
  • 12
  • 24
8
votes
1 answer

Getting not_authed slack error on web api call though token is passed

I have successfully added an application in slack api with the permission scope set administer the teams: I have generated the token from Legacy token generator And I am making a api call with the following information from postman. endpoint:…
Tara Prasad Gurung
  • 3,422
  • 6
  • 38
  • 76
8
votes
2 answers

Slack API - Attatchments from custom bot post as plain text

I'm using Python 2.7 along with a python-slackclient. I have an attachment structure like so: self.msg = { "attachments": [ { "fallback": "%s, %s" % (self.jiraIssueObj.fields.summary, self.link), "pretext":…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
8
votes
1 answer

Display all online users in a Slack channel

New to slack at the moment - I've looked around to see if there's a Slack command to show all online users in a Slack channel but haven't found any. Would a custom slack command calling a Slack API method eg. users.getPresence be the way to go or is…
essa
  • 83
  • 1
  • 1
  • 4
8
votes
1 answer

Slack DM to a user not in `im.list`

I'm implementing a slack ops bot that will notify users of job completion on a build server. It needs to be able to DM users on job completion. I've setup a bot user as per the instructions @ https://api.slack.com/bot-users. To send a DM to a…
Irshad
  • 199
  • 2
  • 9
8
votes
1 answer

How to get username/userID in slack bot

https://github.com/DeronLee/starbot.git I created a slack bot and it worked fine. But when somebody sends message to the bot, I'm not able to tell who sent it. I tried msg.user msg.username, but all of them are undefined. I just want my output to…
Deron Lee
  • 379
  • 1
  • 3
  • 8