我正在使用传入的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?
发布评论