この記事に書いてあること
- 開発ユーザ追加方法
- webhookURL追加方法
- pythonでのslack api使用例
開発ユーザ追加方法
左のメニューの[Collaborators]→[Add a member]→ユーザー名入力

webhookURL追加方法
左メニューの[Basic Information]→[Incoming Webhooks]

→[Add New Webhook to Workspace]

→[チャンネルを検索]でチャンネル名を選択→[許可する]

webhook URL使い方(python)
webhook->投稿したいチャンネルのURLをcopy
(今回はtl_ikegamiに投稿テスト)

下のコードの”コピーしたURLを入力”にURLを入力します。
import requests
import json
if __name__ == '__main__':
webhook_url = "コピーしたURLを入力"
message = "hellowworld"
requests.post(webhook_url, data=json.dumps({'text': message}))
#tl_ikegamiチャンネルに"helloworld"と投稿する
実行すると下の画像のように投稿ができるようになります。

最後に
slackapiに他ユーザーを追加することで他の人にslackbotの管理を任せることができるようになります。
また、pythonを使ってslackに文字を投稿することができました。応用するとslackに自動投稿ができるようになります。
DMP構築のご相談
お気軽にお問い合わせください