slack-api

Microsoft Bot Framework Bot duplicate responses in Slack

时间秒杀一切 提交于 2019-12-11 15:26:54
问题 I have a simple code to test bot responses in my RoodDialog.cs code: if (activity.Text.Trim().ToLower() == "--hi") { IMessageActivity replyMessage = context.MakeMessage(); replyMessage.Text = $"Hello {activity.From.Name}"; await context.PostAsync(replyMessage); } Works as expected in Skype, Emulator and Facebook Messenger, however sends duplicate response messages ("Hello {Name}") in Slack. I think its either Slack configuration or a Bot Framework issue. Anyone seen and resolved this? Thanks

Add permissions for user on Slack

不羁岁月 提交于 2019-12-11 15:19:27
问题 How can we add more scopes/permissions for a user when he signs into slack using Sign in to Slack button. I have added the scopes in the Outh permissions/scopes on my Slack App.it works for the primary owner but not for other users. I have a similar question here. I think I figured out the that I have to add permissions but cannot figure out how. I tried adding it to the initial oauth flow of the sign in with Slack button but it says that I am not allowed to use other scopes with identity

Script in server saving locally

血红的双手。 提交于 2019-12-11 15:18:52
问题 I wrote a script that is using slack API to parse AWS S3 files looking for strings or samples. As this is in testing, I'm using my local machine and ngrok to forward localhost traffic. The thing is that the generated files are getting stores in my machine and will be stored in server once the script is ready for production. Ideally, I'd like to avoid users needing to grab files from server. Do you think it's possible to store directly in user local machine? 回答1: No. Slack does not allow you

Uploading file to Slack API files.upload with jquery

六眼飞鱼酱① 提交于 2019-12-11 15:15:37
问题 I'm trying to, on a webpage, select a file and post it in Slack via the Slack API. I was originally doing: var request = require('request'); $(".submit").click(function(){ request.post({ url: 'https://slack.com/api/files.upload', formData: { token: "myTokenHere", title: "Image", filename: "image.png", filetype: "auto", channels: "mychannel", file: document.getElementById('idofuploadelement').files[0] }, }, function (err, response) { console.log(JSON.parse(response.body)); }); So then I

Slack: How can I remove a message's action buttons without Slack appending “edited”

拈花ヽ惹草 提交于 2019-12-11 15:12:46
问题 I have a Slackbot message that has action buttons (see here). When a user click's a button, we perform a bit of work on our server and then use chat.update to remove the action buttons and update the message's footer: removeButtons(reply, convo, footer) { const data = reply.original_message; delete data.attachments[0].actions; data.channel = reply.channel; if (footer) { data.attachments[0].footer = footer; } this.bot.api.chat.update(data, (res) => { }); } Everything is working great but Slack

is it secure to use ngork for a redirect uri for oauth2

萝らか妹 提交于 2019-12-11 15:09:20
问题 Let me make this clear from the beginning: I'm a complete noob regarding oauth2 and not a dev (just monkey interested in tech stuff) so the question might be silly. If so please don't hesitate to smash the monkey as he truly deserved it... Since I wanted to get a better understanding of how oauth2 is working I wanted to setup slack within emacs. This is not my first project with oauth2. I managed to get offlineimap working with gmail using oauth2. However, google did one step automatically

Hubot with slack adapter - cannot perform rtm.start

梦想与她 提交于 2019-12-11 12:15:14
问题 I'm trying to have hubot + slack on my local machine. installed hubot and slack client. running: bin\hubot -a slack and got error (after adding log messages to the script) INFO Connecting... INFO { ok: false, error: { [Error: socket hang up] code: 'ECONNRESET' } } from reading code in node_modules\slack-client\src\client.js found the problem occurs in a POST request: Client.prototype.login = function() { this.logger.info('Connecting...'); return this._apiCall('rtm.start', { agent: 'node-slack

How to message a user in a slack App via API?

a 夏天 提交于 2019-12-11 11:30:16
问题 When creating a slack app, it creates a new "channel" in the left hand menu. I want to be able to send a message to specific users and not to all users in a workspace who have integrated with the app. For example, if I make the following request: curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/ABxxx/CDxxx/EFxxxxxx It will send a message to all users who have integrated with my app with the text "Hello World". But I only want

Implement conversations.create in C#

穿精又带淫゛_ 提交于 2019-12-11 09:53:05
问题 I am looking at Slack’s documentation on conversations.create and I’m not sure how to integrate it in C#. Do I need to import their Slack API solution into my code to use it? Any help would be great! 回答1: To create a channel with C# all you need to do is make a POST request to the respective API method. channels.create will work, but I recommend the newer conversations.create API method. There are many way how to you can make a POST request in C#. Here is an example using HttpClient , which

Is it possible to use slack API to remove a user without paid version

跟風遠走 提交于 2019-12-11 09:45:33
问题 I need to find a way to remove a user from my slack team without having a paid version of slack. I found this API method: users.admin.setInactive But it requires me to have a paid version. Are there any workarounds to make this possible on a free tier Slack? 回答1: No. Unfortunately, deactivating a user by API is only possible with a paid version of Slack. But I can offer a few organizational workarounds from my experience with managing large Slack teams on free tier that makes work easier for