0

I want to send a message in a channel in my slack workspace. I have seen many tutorials on how to use it but they are all in node.js, python but not java. Is there any way I could send a message at the slack channel #general when someone opens my app? Thanks in advance

Phantômaxx
  • 36,442
  • 21
  • 78
  • 108

1 Answers1

0

Incoming webhooks on Slack are very easy to use and basically work with any programming language / platform as long as you are able to send a HTTP POST request.

First I would recommend to check out the excellent documentation with step-by-step instructions on how to get started with webhooks.

Then to get the feel for how webhooks I would advise playing around with it using tools like Postman or cURL.

Last but not least: if you want to learn how to make a HTTP POST request in Java, check out this answer.

Erik Kalkoken
  • 23,798
  • 6
  • 53
  • 81
  • Thanks! Also, I can use the HTTP POST to use discord webhooks as well? (sorry for being a noob) –  Sep 11 '18 at 15:08
  • yes. Discord webhooks work similar and you can also use HTTP POST requests to use them. See the documentation for it here: https://discordapp.com/developers/docs/resources/webhook#execute-webhook – Erik Kalkoken Sep 11 '18 at 15:17
  • Cool, ill try it and I will ask if I have any problems, thanks for your help –  Sep 11 '18 at 15:37