slack-api

How can I share my slack app between my workspaces?

拥有回忆 提交于 2019-12-29 08:45:10
问题 I've just created an app (slash command) and install it in one of my workspaces. But now I want to add the same app to another one. Is it possible without distribution to App Directory? 回答1: If you want to add you Slack app to another workspace, you can do so without going through the process of placing it on the App directory. All you need to do is add the ability to install your app to an workspace using OAuth 2.0. enable public distribution So instead of clicking "Install app to this

How to integrate internal APIs (Not accessible outside office network) to slack slash commands

允我心安 提交于 2019-12-28 04:33:16
问题 I am trying to use slash commands to my one of the slack channel. I tried to do a POC using git API and it worked fine. I first created a slash command from this link : https://api.slack.com/censored/slash-commands Commnad: /poc Request URL: http://jsonplaceholder.typicode.com/posts This worked fine when I type /opc on slack chat box of my channel. It returns some data. But when I change the Request URL to an internal API, which is accessible only from the office domain, I get error: Darn –

How to configure slash command response to entire channel?

我与影子孤独终老i 提交于 2019-12-25 14:01:18
问题 I'm currently using the "Isitup" slack slash command example authored by David McCreath (more here": https://github.com/mccreath/isitup-for-slack/blob/master/isitup.php). Within this code, I am wondering how I would go about making the response go from appearing "only to me" to posting in to the entire channel, along with the query posted by the user. I've read the slack documentation which shows the "in_channel" parameter that needs to be added, however I am just not that strong with code so

How to configure slash command response to entire channel?

∥☆過路亽.° 提交于 2019-12-25 14:00:27
问题 I'm currently using the "Isitup" slack slash command example authored by David McCreath (more here": https://github.com/mccreath/isitup-for-slack/blob/master/isitup.php). Within this code, I am wondering how I would go about making the response go from appearing "only to me" to posting in to the entire channel, along with the query posted by the user. I've read the slack documentation which shows the "in_channel" parameter that needs to be added, however I am just not that strong with code so

Slack Channel Auto-complete search API

孤街醉人 提交于 2019-12-25 08:44:04
问题 I have been trying to enable auto-fill to grab slack channel list in my app and wondering if there is any api available that would let me search both public and private channels based on user input queries like if i want to look for "slack admins" private channel if i type "sl" it should give me list of all channels with those 2 letters in subsequent way . its basically search of channel names 回答1: Usually auto complete will only work for public channels, but there is a way to get it to work

Wordpress Post Notification with full HTML via Slack

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 00:04:39
问题 When I create a post in Wordpress a slack notification plugin sends notifications to a channel using the slack api. The notification works fine. What I'm trying to do is to the send the content of the post to the channel including the formatting and HTML. I can easily get the content to post to the channel, but I'm struggling to get the content to be formatted. This may be a Slack issue, but I'm not sure. Here's the code. `$message = apply_filters('the_content',$post->post_content);` I'm not

Slack messages don't reach botframework GA

可紊 提交于 2019-12-24 19:36:08
问题 I followed the MS documentation on how to configure a Slack channnel for a bot. But I believe it is outdated because it talks about dev.botframework.com configuration and not from the Azure portal. Interestingly enough the URL slack.botframework.com for configuring the api still works. But the issue is that even debugging my bot locally with ngrok, the only message that reaches the bot is one when I try to authorize the channel in slack, after that when I write a message it doesn't reach the

How to get a workspace agnostic Slack bot token?

无人久伴 提交于 2019-12-24 15:45:54
问题 I'm trying to create a bot that people can install in their workspaces and send/receive messages of some sort. The problem I'm running into is the documentation tells you to use the token generated for your workspace: https://api.slack.com/bot-users#installing-bot But this makes no sense, seeing as people would be installing the App/Bot on their workspace themselves, it's not like they would be giving me their token or anything. Surely I'm missing something. How am I meant to authenticate a

Slack API not returning private channels

為{幸葍}努か 提交于 2019-12-24 11:29:21
问题 I'm trying to obtain a list of private channels in Slack (on a per-user basis is fine), but I'm having trouble seeing this information. I installed my application into the workspace in Slack originally and got an OAuth token in the form xoxp-4........... . App OAuth token When I try to use the slack API (node SDK) then I only get the publicly listed channels. await new WebClient(`xoxp-4.....`) .conversations .list({ exclude_archived: true }) ).channels I get the same if I try using the Slack

no_file_data error when using Slack API upload

扶醉桌前 提交于 2019-12-24 10:49:45
问题 I'm getting this error {"ok":false,"error":"no_file_data"} when I try to call the slack API to upload. I already have the specified file in ./log. robot.respond /upload (.*)/i, (res) -> app_name = res.match[1] request = require("request") fs = require("fs") channel_name = res.message.room data = { channels: channel_name, filename: "#{app_name}.txt", file: fs.createReadStream("./log/#{app_name}.txt"), } robot.http("https://slack.com/api/files.upload") .headers(Authorization: 'Bearer slack