Assaf Karmon
Assaf Karmon

Reputation: 923

how to send a message to a slack channel?

This must be completely obvious and I am sure I am missing something here but here it goes:

according to slack documentation : curl -X POST -H 'Content-type: application/json' \ --data '{"text":"This is a line of text.\nAnd this is another one."}' \ https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

but where do I find my account specific parameters to go in here : T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Upvotes: 0

Views: 3053

Answers (2)

Erik Kalkoken
Erik Kalkoken

Reputation: 32884

As has already been pointed out this is an incoming webhook, which is an easy way to post messages to Slack. The full URL is arbitrary and will be automatically generated for your as soon as you have created the webhook for your Slack team

On the official documentation page about incoming webhooks I am guessing you missed the link in the 2nd paragraph ;-)

"Start by setting up an incoming webhook integration...".

Just click the link to set up your webhook.

Upvotes: 0

Sterling Archer
Sterling Archer

Reputation: 22435

According to this page https://www.programmableweb.com/news/how-to-integrate-webhooks-slack-api/how-to/2015/10/20

You get that URL by clicking "Add Incoming Webhook Integration"

When you're done doing whatever it needs, it gives you the URL you need to post to. It's a bit different than using an API token.

Upvotes: 1

Related Questions