postMessage vs Incoming WebHook

1,127 views
Skip to first unread message

pe...@petegoo.com

unread,
May 24, 2014, 7:33:31 AM5/24/14
to slac...@googlegroups.com
It seems to me that postMessage is a lot more flexible than the Incoming Webhook due the fact that I don't have to set up an integration for each channel that I want to post to.

When should I use Incoming webhook vs postMessage?

Paul Hammond

unread,
May 27, 2014, 7:45:55 PM5/27/14
to slac...@googlegroups.com
Hi Pete,

A single incoming webhook can be used to post to multiple channels by providing a "channel" property on the message you post. For example:

curl -X POST --data-urlencode 'payload={"channel": "#test", "text": "This is posted to #test"}' https://my.slack.com/services/hooks/incoming-webhook?token=...

All of the options for postMessage (parse mode etc) are also supported by incoming webhooks. Many people find the incoming webhooks easier to setup - but if postMessage works for you there's no reason not to use it!

Hope this helps,

Paul

 


On Sat, May 24, 2014 at 4:33 AM, <pe...@petegoo.com> wrote:
It seems to me that postMessage is a lot more flexible than the Incoming Webhook due the fact that I don't have to set up an integration for each channel that I want to post to.

When should I use Incoming webhook vs postMessage?

--
You received this message because you are subscribed to the Google Groups "Slack API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slack-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages