기타
Slack Incoming Webhooks을 사용하는 방법
변군이글루
2020. 10. 7. 11:29
반응형
Slack Incoming Webhooks을 사용하는 방법
slack webhooks(incoming webhooks) 생성
1. 슬랙 앱(프로그램)
2. workspaces > Apps > 검색 창에서 "webhooks" 검색
3. 슬랙 웹 페이지에서 "Add to Slack"
4. 채널 선택 > "Add Incoming WebHooks intergration"
5. Webhook URL 복사
728x90
slack 메세지 전송 테스트
- 메시지 전송
curl -X POST -H 'Content-Type: application/json' --data '{"text":"Hello, World!"}' "webhookURL"
curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "Hello, this is some text\nThis is more text. :tada:"}' "webhookURL"
curl -s -d "payload={\"text\":\"슬랙 테스트 메세지\"}" "webhookURL"
curl -X POST --data-urlencode "payload={\"channel\": \"#info\", \"username\": \"webhookbot\", \"text\": \"이 항목은 #개의 info에 포스 트되며 webhookbot이라는 봇에서 제공됩니다.\", \"icon_emoji\": \":ghost:\"}" https://hooks.slack.com/services/T01756336B/B3333G492BJR/BxL333pSgBjXg4EqXwrh
- 전송된 메시지 확인
기존에 생성되어 있는 Webhook URL 찾기
Browse Apps > Custom Integrations > Incoming WebHooks > Edit configuration
728x90
반응형