- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用 Slack API 从我的工作空间中删除旧文件,因为我们上传新文件的空间不足。
我注册了一个应用程序,将其安装在目标工作区上,授予应用程序 files:read
和 files:write
权限,然后为具有前缀 xoxb
的应用程序。
使用此 token ,我向 the files.list 发出了 GET 请求使用 Postman 的端点:
GET https://slack.com/api/files.list?token=xoxb-xxxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx&count=100&page=1&show_files_hidden_by_limit=true
HTTP/1.1
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 29879ef1-6da3-4863-8bb9-da8b4d5f740c
Host: slack.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
HTTP/1.1 200 OK
date: Sat, 09 Jan 2021 18:18:42 GMT
server: Apache
x-xss-protection: 0
pragma: no-cache
cache-control: private, no-cache, no-store, must-revalidate
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-slack-req-id: d972daab31ff4fe7a477eb3149ad5260
x-content-type-options: nosniff
referrer-policy: no-referrer
access-control-expose-headers: x-slack-req-id, retry-after
x-slack-backend: r
x-oauth-scopes: files:read,files:write
x-accepted-oauth-scopes: files:read
expires: Mon, 26 Jul 1997 05:00:00 GMT
vary: Accept-Encoding
access-control-allow-headers: slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x-b3-sampled, x-b3-flags
content-encoding: gzip
content-length: 87
content-type: application/json; charset=utf-8
x-envoy-upstream-service-time: 444
x-backend: files_normal files_canary_with_overflow files_control_with_overflow
x-server: slack-www-hhvm-files-iad-jc2v
x-via: envoy-www-iad-4782, haproxy-edge-iad-y1wa
x-slack-shared-secret-outcome: shared-secret
via: envoy-www-iad-4782
{
"ok": true,
"files": [],
"paging": {
"count": 100,
"total": 1803,
"page": 1,
"pages": 19
}
}
如您所见,响应包含一个空的 files[]
数组,但 paging
属性告诉我工作区中有 1803 个文件。
为什么我看不到工作区中的任何文件,即使我有适当的范围并收到 HTTP 200 响应?
最佳答案
我不知道这是否是的答案,但这是一个解决方法:
channels:read
和 channels:join
作用域id
属性据推测,您可以遍历工作区中的每个公共(public) channel ,加入每个 channel ,列出其文件,然后删除早于特定日期的文件。
关于slack-api - 为什么 Slack 的 files.list 端点返回一个空文件数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65646097/
我刚刚创建了一个新的 Slack 应用程序并向其中添加了一个机器人。 现在我有 2 个可用的 token : OAuth 访问 token (xoxp) 机器人用户 OAuth 访问 token (x
我正在构建与 Slack 和客户端的消息传递集成。我需要在用户登录客户端时在相应的对话上显示徽章,以向客户端显示它有多少条未读消息。 我知道 channels.history 方法有 unreads
我有一个 slack POST api 调用,我正在从我的应用程序中调用它:- slack_client.api_call("chat.postMessage", channel=channel, t
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 去年关闭。 Improve this
Slack 默认头像来自哪里?这是他们自己的服务还是第三方服务? 在任何一种情况下,其他人是否有可能使用头像创建服务/系统,例如通过 slack API? 最佳答案 我 asked Slack dir
我正在编写一个脚本,以我的身份发布自动消息。我很难找到我的用户 token 。我必须创建一个应用程序吗? 最佳答案 是的,您必须创建一个应用程序才能生成用户 token 。您可以从此处创建一个应用程序
我正在为一些自动通知创建一个 slackbot,并且我收到了一个请求,让通知占据整个 slack 窗口的宽度,这看起来更干净。我发现 block 似乎占据了一个指定的宽度,并且不会水平延伸超过该点。我
我想创建一个 Slack 命令 /command do-something-with-that-file,同时用户上传文件。 到目前为止,我的命令已收到,但负载中没有文件。这可能吗? 我还在作用域中添
我一直在使用 Slack 操作 API,但不知道如何使用 response_url 在原始消息的线程中发送回复。 chat.postMessage 选项实际上不起作用,因为它需要手动将机器人添加到 c
“Slack”可以将链接展开为视频,但有些服务可以,有些则不能。 Vimeo( https://vimeo.com/ ) 可以在 Slack 中将链接展开为视频。 TED( https://www.t
我想复制一个现有的 Slack 应用程序,只更改一些小的配置。 除了从头开始创建新的 slack 应用程序并重新配置它之外,还有更简单的方法吗? 最佳答案 或者,您可以使用App Manifest 功
On slack - 我可以使用以下文本语法直接从我的两者中标记用户: hello Francois 我想对群组执行同样的操作(不幸的是,我的应用程序只知道群组名称,不知道群组 ID)。是否有这样做
我们使用通信工具 Slack。它在我的左侧边栏中显示了我最近与之进行过直接消息对话的在线和离开用户。我想在列表中看到当前在线的每个人,我们 Slack 服务器上的所有在线用户。在聊天应用程序的侧边栏中
我正在尝试构建一个在首次安装到工作区时执行某些操作的应用程序,例如:Ping 每个团队成员。 我找不到在应用安装时触发的事件类型: https://api.slack.com/events 有什么办法
我有一个发送长消息的机器人。 当它发送多条消息时,用户图标通常会滚出屏幕,因为没有人在机器人的消息之间发送过消息。 这意味着发送消息的时间和发送者不太明显。 有没有办法强制 Slack 为每条消息显示
我不完全确定这是否适合 Stack Overflow... 只是一个简短的问题,希望很多人会觉得有用。 我看到您可以使用主题标签,但它们必须与现有 channel 相对应。我有一个与一个项目相关的 c
例如,我希望在我休息的日子里每天在特定 channel 中显示提醒。就像是: /remind #channel @me will be on PTO 1/1/2016 until 1/5/2016 然
我被一位同事添加到 Slack 工作区。我一定已经接受了移动应用程序上的某些内容,因为我可以访问那里的工作区。不知何故,桌面应用程序从未反射(reflect)过这种变化,也没有表现出知道工作空间的迹象
我是 Slack 的新手,刚刚创建了我的第一个 channel 。在设置 channel 时,我添加了一个目的,但是一旦创建,还有一个添加主题的地方。 channel 的目的和主题有什么区别?它们看起
线程将是 Slack 的一个非常好的特性,只是它们太窄了,我找不到任何方法来配置它们的宽度。 有谁知道如何扩展线程以使其占用所有屏幕空间(在 Slack 内)?放大不会改变窄度。它只会使字体更大。我想
我是一名优秀的程序员,十分优秀!