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
17
votes
2 answers

Mention Users Group via Slack API

I would like to mention Users Group via Slack API (Rest), is it possible? I tried via @admins, <@admins>, <@ID>, But it still is showed as a standard text, without mention. Any ideas?
Paweł Kaczorowski
  • 1,502
  • 2
  • 14
  • 25
17
votes
2 answers

How can I make it so that slack bots can use Giphy?

For some reason, the existing Giphy app for slack does not allow bots to call a GIF from giphy.com If I type "/Giphy sad", the Giphy app will automatically load a sad GIF of somekind from Giphy.com But if my slackbot does it, or my hubot, or my…
leigh
  • 309
  • 1
  • 2
  • 8
16
votes
1 answer

Slack - Get thread id after posting message using incoming web hook

I am using slack incoming web hook to post message to a channel. Here is my code curl -X POST \ https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX \ -H 'Content-Type: application/json' \ -d '{ "text": "Test…
Ijas Ahamed N
  • 5,632
  • 5
  • 31
  • 53
16
votes
2 answers

How to set a Slack reminder only to notify a subset of the people in the channel

I need to set up a reminder in a channel, but this reminder should not send a notification to all the people in the channel but only to a particular subset. I tried what shown below. /reminder @user1 @user2 @user3 A message every 30 days But when…
cloudy_weather
  • 2,837
  • 12
  • 38
  • 63
16
votes
1 answer

How to disable a slackbot button after clicking on it

I'm creating buttons for a slackbot using something like: const messageB = { "attachments": [ { "text": "Essa mensagem foi útil?", "callback_id": "button_feedback", "color":…
Newton Joaquim
  • 171
  • 1
  • 3
16
votes
4 answers

Open URL in browser from Message Button using Slack API

I am sending the users a slack message with a button through a Slack App. On every click of the button, I generate a new URL. At the moment, I am able to return the URL back as a message. The user clicks on the message to open the URL in the…
nithishr
  • 596
  • 1
  • 7
  • 17
16
votes
1 answer

Can slack incoming webhooks post message to all private groups?

I was searching if slack incoming webhooks can send message to all private groups, but I didn't find any slack documentation on that. So, can slack incoming webhooks send message to all private groups?
Matias Cubero
  • 161
  • 1
  • 1
  • 5
15
votes
1 answer

How to Get User Token for Slack API?

I made a new Slack App, got both my user token and bot token, and now my app can post messages as me. But what if I want this app to post messages as someone else from my team? How to get their token? Or where they can find it?
Alex Rublev
  • 183
  • 1
  • 1
  • 6
15
votes
1 answer

Jenkins slackSend pretty url

I am using the jenkins slack notification plugin inside a pipeline. Inside that pipeline I've got several slackSend (color: colorCode, message: message) I am also posting several links sometimes which show up fully extended on slack:…
ntakouris
  • 898
  • 1
  • 9
  • 22
15
votes
1 answer

How to install bot in multiple teams without adding it to the directory?

I just finished creating my first slack bot in my dev slack team using the Microsoft bot framework. Now I would like to add the bot to another team for testing. My bot is not going to be for public use, just internal to the company. I tried use…
Eric
  • 151
  • 1
  • 4
15
votes
2 answers

Posting an image with slack API

I'm attempting to post an image w/the slack API. I have two APIs open (using python) currently, which is rtm & slackbot. sc = SlackClient(API_KEY) sc.api_call('chat.postMessages', channel=, text=) #post as…
mr-sk
  • 13,174
  • 11
  • 66
  • 101
14
votes
2 answers

Slack bot fails to send message to restricted general channel via chat.postMessage

This is my first time trying to create a slack bot and I am following this template code to the word, I have not made any changes, and just remixed on glitch, copy-pasted the auth tokens correctly, things worked just fine. That is until I made the…
MithunS
  • 485
  • 7
  • 28
14
votes
3 answers

Name 'Key' not defined Lambda function to access DynamoDB

I am using the query function from the boto3 library in Python and receiving the following error: name 'Key' is not defined: NameError Traceback (most recent call last): File "/var/task/lambda_function.py", line 51, in lambda_handler if not…
snovosad54
  • 361
  • 1
  • 3
  • 13
14
votes
3 answers

Get list of channels a user is a member of

Writing a slack bot and I would like to be able to get a list of all the channels my bot is a member of. One way to do this is to call https://slack.com/api/channels.list, get a (potentially large) list of all channels and then search for the…
Matt Burland
  • 44,552
  • 18
  • 99
  • 171
14
votes
1 answer

Restrict slack-slash command access

I have automated the deployments in Jenkins from slack by slash commands. I need give permission for slash commands or restrict the slash command access only to particular users (i.e) some members in the channel can deploy the dev environment by…
soundararajan.c
  • 2,538
  • 6
  • 29
  • 51