Slack. Web. Files. Remote
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Adds a file from a remote service
Retrieve information about a remote file added to Slack
Retrieve information about a remote file added to Slack
Remove a remote file.
Share a remote file into a channel.
Updates an existing remote file.
Functions
Adds a file from a remote service
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
remote_files:write
Required Params
external_id- Creator defined GUID for the file. ex:123456external_url- URL of the remote file. ex:http://example.com/my_cloud_service_file/abc123title- Title of the file being shared. ex:Danger, High Voltage!
Optional Params
filetype- type of file ex:docindexable_file_contents- A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file. ex:...preview_image- Preview of the document viamultipart/form-data. ex:...
Errors the API can return:
bad_image- The uploaded image could not be processed - try passing a JPG or PNGbad_title- The title provided is too long.bot_user_required- bot user token is requiredinvalid_external_id- The external_id provided is too long.too_large- The uploaded image had excessive dimensions
See the Common Errors guide for errors returned by every Web API method.
Retrieve information about a remote file added to Slack
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
remote_files:read - User token:
remote_files:read
Optional Params
external_id- Creator defined GUID for the file. ex:123456file- Specify a file by providing its ID. ex:F2147483862
Errors the API can return:
file_not_found- Value passed forfileorexternal_idwas invalidinvalid_args- Invalid arguments passed to endpointno_bot_user_for_app- Cannot call the Remote Files endpoints unless app has associated bot usertoo_many_ids- The request specified both an external_id and a file, only one may be specified
See the Common Errors guide for errors returned by every Web API method.
Retrieve information about a remote file added to Slack
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
remote_files:read - User token:
remote_files:read
Optional Params
channel- Filter files appearing in a specific channel, indicated by its ID.cursor- Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request'sresponse_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. ex:dXNlcjpVMDYxTkZUVDI=limit- The maximum number of items to return. ex:20ts_from- Filter files created after this timestamp (inclusive). ex:123456789ts_to- Filter files created before this timestamp (inclusive). ex:123456789
Errors the API can return:
invalid_cursor- Value passed forcursorwas not valid or is no longer valid.no_bot_user_for_app- Cannot call the Remote Files endpoints unless app has associated bot user
See the Common Errors guide for errors returned by every Web API method.
Remove a remote file.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
remote_files:write
Optional Params
external_id- Creator defined GUID for the file. ex:123456file- Specify a file by providing its ID. ex:F2147483862
Errors the API can return:
bot_user_required- bot user token is requiredfile_not_found- Value passed forfileorexternal_idwas invalidfile_under_review- File passed is tombstoned for DLP reviewinvalid_args- Invalid arguments passed to endpointtoo_many_ids- The request specified both an external_id and a file, only one may be specified
See the Common Errors guide for errors returned by every Web API method.
Updates an existing remote file.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
remote_files:write
Optional Params
external_id- Creator defined GUID for the file. ex:123456external_url- URL of the remote file. ex:http://example.com/my_cloud_service_file/abc123file- Specify a file by providing its ID. ex:F2147483862filetype- type of file ex:docindexable_file_contents- File containing contents that can be used to improve searchability for the remote file. ex:...preview_image- Preview of the document viamultipart/form-data. ex:...title- Title of the file being shared. ex:Danger, High Voltage!
Errors the API can return:
bad_image- The uploaded image could not be processed - try passing a JPG or PNGbot_user_required- bot user token is requiredfailed_to_unshare- The file was either not found or it has been unshared already.file_not_found- Could not find the file to update.invalid_title- invalid title providedinvalid_type- invalid type providedinvalid_url- invalid url providedtoo_large- The uploaded image had excessive dimensions
See the Common Errors guide for errors returned by every Web API method.