79752620

Date: 2025-09-01 14:07:16
Score: 0.5
Natty:
Report link

Here is the correct syntax:

curl -X POST \
-H "Authorization: Bearer $BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel": "CXXXXXXXX", "text": "Hello, world! <@UXXXXXXXX>"}' \
https://slack.com/api/chat.postMessage

Just replace the CXXXXXXXX with the channel id you want to target and the UXXXXXXXX with the user id you want to tag (optional). To learn more on how to find these values and generate a $BOT_TOKEN, read my blog: https://ducttapecode.com/blog/slack-integration/article/

Reasons:
  • Has code block (-0.5):
  • Filler text (0.5): XXXXXXXX
  • Filler text (0): XXXXXXXX
  • Low reputation (0.5):
Posted by: Guillaume Blanchet