是否可以使用传入的Webhook将文件发布到Slack?

编程入门 行业动态 更新时间:2024-10-27 08:25:26
本文介绍了是否可以使用传入的Webhook将文件发布到Slack?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用传入的Webhook功能试用Slack的API,发布消息的过程很完美,但是似乎不允许任何文件附件.

I am trying out the Slack's API using the incoming webhook feature, posting messages works flawlessly, but it doesn't seem to allow any file attachments.

我了解到我必须使用完全不同的基于OAuth的API,但是在发布消息时效果很好,只是为了上传文件而创建更多令牌似乎很奇怪,无法将文件上传到接收方时变得松弛webook?

Looking through I understand I have to use a completely different OAuth based API, but creating more tokens just for the purpose of uploading a file seems odd when posting messages works well, is there no way to upload files to slack with the incoming webook?

推荐答案

否,无法通过传入的Webhook上传文件.但是您可以使用image_url标签将图像URL附加到附件中.

No, its is not possible to upload files through an incoming Webhook. But you can attach image URLs to your attachments with the image_url tag.

要上传文件,您需要使用Slack Web API和 files.upload 方法.是的,它要求使用不同的身份验证,但是如果您只对全部使用测试令牌,它就不会那么复杂API调用.

To upload files you need to use the Slack Web API and the files.upload method. Yes, it requires a different authentication, but its not that complicated if you just use a test token for all API calls.

更多推荐

是否可以使用传入的Webhook将文件发布到Slack?

本文发布于:2023-10-11 04:42:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1480712.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以使用   文件   Webhook   Slack

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!