以编程方式创建 Slack Webhook
Creating a Slack Webhook programmatically
有什么方法可以使用 Slack API 为我刚创建的频道创建传入和传出 webhook?
不,我认为该功能不存在,但您可以将任何现有的 webhook 与新创建的频道一起使用,或者使用事件 API 来获得相同的结果。
传入 Webhooks
您可以通过在调用中提供频道名称作为参数,将传入的 Webhook 重定向到任何频道。 (参见 Channel override)
传出 Webhooks
您现有的 outgoing webhook will work with any channel, as long as you use triger words when you created them. If that is not an option, I would recommend to look at the new Event API that would allow you to get the same functionality as with outgoing webhooks, but without having to provide a channel name in the first place. Check out the event types message.channels and message.groups.
以编程方式生成传入 Webhook URLs -
可以在标准 OAuth 安装流程中轻松生成传入的 Webhook。
如果您要分发您的应用程序,您可能已经计划使用 OAuth 流程。
更改范围
从 OAuth 响应中获取传入 Webhook URL
https://api.slack.com/messaging/webhooks#incoming_webhooks_programmatic
有什么方法可以使用 Slack API 为我刚创建的频道创建传入和传出 webhook?
不,我认为该功能不存在,但您可以将任何现有的 webhook 与新创建的频道一起使用,或者使用事件 API 来获得相同的结果。
传入 Webhooks
您可以通过在调用中提供频道名称作为参数,将传入的 Webhook 重定向到任何频道。 (参见 Channel override)
传出 Webhooks
您现有的 outgoing webhook will work with any channel, as long as you use triger words when you created them. If that is not an option, I would recommend to look at the new Event API that would allow you to get the same functionality as with outgoing webhooks, but without having to provide a channel name in the first place. Check out the event types message.channels and message.groups.
以编程方式生成传入 Webhook URLs -
可以在标准 OAuth 安装流程中轻松生成传入的 Webhook。
如果您要分发您的应用程序,您可能已经计划使用 OAuth 流程。
更改范围
从 OAuth 响应中获取传入 Webhook URL
https://api.slack.com/messaging/webhooks#incoming_webhooks_programmatic