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

Permission denied for usergroups.users.update

I'm trying to add a user to a usergroup (and by that trying to use the API call usergroups.users.update) I'm using a workspace token that has the scope usergroups:write and usergroups:read (complete list: channels:read, channels:write, chat:write,…
Fluff
  • 548
  • 4
  • 8
7
votes
1 answer

rtm_connect to slackbot gives SSL certificate validation error

I have a slackbot in my workspace. I am using this python script to connect to the slackbot and process the chat messages it gets. The below line gives SSL error: slack_client.rtm_connect(with_team_state=False) Error: Traceback (most recent call…
aniztar
  • 2,443
  • 4
  • 18
  • 24
7
votes
4 answers

slack api to find existing channel

I am playing with slack apis to create an integration. I am able to sucessfully create a slack channel using this.http.post(slackApiHost + '/channels.create', payload, {headers: headers}) .subscribe( res => { …
Vik
  • 8,721
  • 27
  • 83
  • 168
7
votes
0 answers

Slack API - remotely delete slash command message from channel

I have a slash command set up in Slack to go look up some info and post a response message back to the channel. I would like the original slash command message that the user sent ("/whatever go get stuff") to be "replaced" by the response message,…
Steve Mason
  • 205
  • 1
  • 2
  • 6
7
votes
2 answers

Slack API - chat.update : "message_not_found"

I'm using the 'slack-node' npm package to build a simple Slack App for my team. The initialization of the bot works great so far. I got it to post a message to a channel after using a custom slash command. This message contains an interactive…
turbopasi
  • 3,327
  • 2
  • 16
  • 43
7
votes
1 answer

Slack webhook and direct/private messages

I created a websocket-based Slack bot (that plays chess). In order to return a graphical representation of the board (so PNG instead of simple ASCII) I must use a webhook since normal messages cannot have attachments. The interaction with the bot is…
Henry Wilson
  • 141
  • 1
  • 3
  • 11
7
votes
1 answer

Upload image to Slack with axios

I'm trying to upload an image to slack using the slack api https://api.slack.com/methods/files.upload. function uploadImage(file) { var form = new FormData(); form.append('image', file); var self = this; const config = { …
MichaelRazum
  • 789
  • 1
  • 10
  • 26
7
votes
1 answer

Autocomplete custom data in Slack commands

Just playing with my first slack command. Is there any way of adding custom data from an external API for autocomplete. So what works perfectly right now, is calling the command /assign plus a slack user (both will be autocompleted, nice!). What I…
everyman
  • 3,377
  • 1
  • 34
  • 33
7
votes
1 answer

Auto-add a bot to all channels on Slack?

I am the admin of a Slack team. Is there a way that I can auto-invite a bot to all slack channels that are created in my team?
7
votes
2 answers

How do you invoke the /poll command using the Slack API?

My slack channel supports the /poll command from the Simple Poll app. How do you invoke this command using the Slack API? Using the python slack(er) API module: from slacker import Slacker # Using what's now called a "legacy token" slack =…
CivFan
  • 13,560
  • 9
  • 41
  • 58
7
votes
1 answer

How to connect slack app to webhook?

How can I do the above as I keep getting the following error when I try and interact with the accompanying button. Darn – that didn't work. Only Slack Apps can add interactive elements to messages
Atlantic0
  • 3,271
  • 5
  • 17
  • 24
7
votes
2 answers

Adding attachment to Slackbot

I'm trying to add an attachment to a slack message via their API. I'm using the python wrapper they recommend. I can send and receive basic messages but when I try to add an attachment in the form of 2 buttons it fails. I have made a slack app and…
Nish
  • 385
  • 1
  • 5
  • 19
7
votes
1 answer

Creating a Slack Webhook programmatically

Is there a way I can use the Slack API to create an incoming and outgoing webhook for a channel I just created?
masterforker
  • 2,443
  • 2
  • 25
  • 39
7
votes
1 answer

Slack API: Do Something when button is clicked

I am using Python and it's Slacker API to post messages to a slack channel and it's posting the messages nicely. Now what I want to do is create a button that says, More Info and when it's clicked, I want to show a list of items. But when the button…
Parth Bhoiwala
  • 1,282
  • 3
  • 19
  • 44
7
votes
4 answers

Is it possible to display times in the recipient's timezone?

I have a webhook that posts a message to a Slack channel. Is there a way to ensure that times mentioned in the message are shown in the user's local timezone?
Dan Ross
  • 3,596
  • 4
  • 31
  • 60