slack

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

Microsoft Bot Framework IDialogContext.Call() not working when using Slack

对着背影说爱祢 提交于 2019-12-24 10:59:21
问题 I have a simple child dialog call in my bot using IDialogContext.Call(). When user types "new project" the following code is called: ... context.Call(new NewProjectDialog(), NewProjectConfirmed); ... NewProjectDialog() just asks for a project name and then saves it before returning to NewProjectConfirmed() [Serializable] public class NewProjectDialog : IDialog<Project> { public async Task StartAsync(IDialogContext context) { await context.PostAsync("What is the name of the project?"); context

Is it possible to use a file path instead of url as `image_url` when sending a message via Slack API or Incoming Webhook?

吃可爱长大的小学妹 提交于 2019-12-24 10:48:53
问题 Let's assume I have the following block which I want to send via Incoming Webhook to Slack { "type": "image", "title": { "type": "plain_text", "text": "foo bar" }, "image_url": "https://api.slack.com/img/blocks/example/beagle.png", "alt_text": "foo" } but instead of providing a http url as image_url I would like to provide a file path because the file I want to send is in the same folder as my script. 1) Is this possible? I guess no. 2) Is it possible to upload an image via files.upload in a

How to download files that were created by a slackbot?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:25:09
问题 I created a bot which collects info from users in a workspace. It stores this info in a csv file on the local server. How do I download said file? I got this bit of code from Stack Overflow, attempted to contact the author but didn't get any response. import requests url = 'https://slack-files.com/T0JU09BGC-F0UD6SJ21-a762ad74d3' token = 'xoxp-TOKEN' requests.get(url, headers={'Authorization': 'Bearer %s' % token}) How do I obtain the URL & token of the file? What is the token? Is it the OAuth

Slack Send Direct Message to ALL on SLACK (Not group message I want to send individual message

独自空忆成欢 提交于 2019-12-24 07:50:01
问题 my question is whether Slack can Send Direct Message to ALL persons on my group on SLACK (Not group message I want to send an individual message 回答1: There is no API method for that, but you can create this functionality easily with a small script. Get all members of a Slack team incl. their user IDs with users.list Loop through all active users (ignore the ones with deleted = false ) Send a direct message to each user with chat.postMessage by using their user ID as channel Be sure though to

Slack: Bot name in sent messages

霸气de小男生 提交于 2019-12-24 06:43:39
问题 I created a bot named "esmeralda". When I send a message to Slack with the token generated for this esmeralda, the message just appears to be from "bot", not "esmeralda". Can I do something so that the message will be shown to be sent by "esmeralda" instead the "bot"? 回答1: I'm guessing you're using the Web API and therefore the chat.postMessage method? I'm further guessing that you're not passing as_user=true as one of your parameters. Try doing that. (If my guesses are wrong, please include

make Python 3.x Slack (slackclient) use a corporate proxy

北城以北 提交于 2019-12-24 04:26:27
问题 I have some Python 3 code and can make it use the module slackclient to post to channels, no problem. However if I run this code from our corporate servers where all traffic needs to go through a proxy it fails. I know the proxy server and port and have to use them to run pip from our servers, like this: pip install --proxy proxy.evilcorp.com:8080 slackclient That works great. If I don't proxy the pip, it fails to connect as expected. So that tells me I just need to figure out how to get my

Using the Slack API, how can I direct message all users at the same time?

巧了我就是萌 提交于 2019-12-24 01:17:05
问题 On Slack, I'm aware that using chat.postMessage allows me to message each user individually, but how would I go about direct messaging the entire team (400 members) at once? 回答1: Hello For that you need a channel with all 400 of them in it, cause currently you cannot send to 400 individual users. For sending message to a channel, you just need to add channel argument for postMessage method. Check this :: https://api.slack.com/methods/chat.postMessage 回答2: There is no "bulk" variant of chat

connecting slack to botman in laravel on localhost

自作多情 提交于 2019-12-24 00:37:20
问题 This is my routes file in laravel. Am matching any url with /botman that calls a closure which, registers a slack driver for botman and listens to the message hello. In slack am trying to set the Request URL under event subscriptions using this http://127.0.0.1:8000/botman . I get "Your URL didn't respond with the value of the challenge parameter." . What am I missing? is it on my routes file? or the url? <?php use BotMan\BotMan\BotMan; use BotMan\BotMan\BotManFactory; use BotMan\Drivers

Properly format a message for slack in bot framework

我的未来我决定 提交于 2019-12-23 19:23:19
问题 I'd like to send a message with buttons to the slack channel. I'm using the bot framework (c#). I want to use the "blocks" (attachments are deprecated according to the slack api docs). So I composed a sample message in the slack "Bot Kit Builder": The json for it looks like this: [ { "type": "section", "text": { "type": "mrkdwn", "text": "Which pill do you want to take?" } }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "Red", "emoji": true },