slack

How to upload any file on Slack via Slack-App in c#

淺唱寂寞╮ 提交于 2019-11-26 22:27:10
问题 I need help with uploading files to Slack. I have a Slack-App that is working with my code(below) so far. But all I can do is post messages. I can not attach images to the messages - because I do not understand how to use the so called "methods" and the syntax Slack is "showing" on their API-page. This creates my "content" and below its just a Stream for reading a file I could upload: public class PostMessage { public FormUrlEncodedContent Content(string message, string file) { var values =

How to send direct messages to a user as app in app channel

可紊 提交于 2019-11-26 14:16:20
问题 How is it possible to send message in slack directly to the user, by user.id as application. this application has scope: bot,channels:write,emoji:read,users:read,users:read.email I find how to send message only as DM or by webhooks, but there is no scope for that. Any one has idea? 回答1: If I understand your question correctly, you want to send direct messages to users in the app channel instead of the standard slackbot channel. In order to do that you need to Your app needs the bot scope and

Execute slash command as slack bot

泪湿孤枕 提交于 2019-11-26 14:08:06
问题 I'm writing a simple slack bot which should execute other slack commands upon being called. Everything is up and running, however the slack commands this bot issues don't seem to be executed. For instance my bot posts /giphy kitten every hour and the message appears just like that in the channel (so the sending side seems to work), but the slash command itself isn't executed. If I post the same command into the same channel myself it works as expected. Are bots not allowed to execute slash

Can i send custom properties/data in slack message attachments?

霸气de小男生 提交于 2019-11-26 12:48:37
问题 I want to send some custom properties in the attachment for interactive messages and retrieve them back in the action response. is there a way to do this? 回答1: Yes, that is possible. However, it only works well for small sets of data. Assuming we are talking about buttons the normal approach would be to use the value field of an action to transfer custom data based on which button the user clicked back to your app. The field is a normal string within a JSON message, which is send by POST