Slack messaging api8/31/2023 Var isValid = response.IsSuccessStatusCode ? "valid" : "invalid" Ĭonsole.WriteLine($"Received Var response = await slackClient.SendMessageAsync(testMessage) Payload testMessage = new Payload(message) Var slackClient = new SlackClient(webhookUrl) ![]() Private static async Task IntegrateWithSlackAsync() This is from someone who posted this online! But I changed and added a few things: public static void Main(string args) Okay, enough whining! I'll show you now what I got so far. if I try to put them in the Payload they are just ignored, it seems. Also I do not understand how to use arguments like a token, specific userId, a specific channel. ![]() ![]() I also do not understand how to use the url-methods like " " - where do they go? As you might see in my code I only have the webhookurl, and if I don't use that one I can not post to anything. I just do not understand what the "payload" for JSON has to look like (actually I'm doing it exactly like it says on Slack's Website, but it doesn't work at all - it always ignores things like "token", "user", "channel" etc.). Problem is I have to do this for my company, so we can integrate slack to our own Software. And I can not do it as myself(under my slackID), just as the App. I can not for the life of me post a message to another channel than the one I webhooked.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |