Slack - Get thread id after posting message using incoming web hook

前端 未结 1 1791
滥情空心
滥情空心 2021-01-17 22:07

I am using slack incoming web hook to post message to a channel. Here is my code

curl -X POST \\
  https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXX         


        
相关标签:
1条回答
  • 2021-01-17 22:27

    Webhooks will not return IDs for your message. So you don't get the thread_ts and ts, which you both need to reply as thread.

    Its technically possible to find your message through calling conversations.history or if you listen to message events. However, you would need some workaround to reliably match them (e.g. add you own IDs).

    In summary: webhooks do not support threads. If you want to do threading you need to post your messages via the API (e.g. chat.postMessage) and not use webhooks. Webhooks are just meant to offer an easy and quick way for posting messages, but they dont't offer the full functionality.

    Here is the full guide on threads.

    0 讨论(0)
提交回复
热议问题