Sample - Slack Web API
GET/files.info

Get file information

Retrieves information about a file and its comments. Use file to select the file and the pagination parameters to control the comments returned for that file. The response includes the file, comments, and paging metadata.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

6 parameters
tokenstringoptional
Authentication token with the `files:read` scope.
filestringoptional
The ID of the file to retrieve information for.
countstringoptional
The requested number of items to return.
pagestringoptional
The page of results to retrieve.
limitintegeroptional
The maximum number of items to return; fewer items may be returned even when more results remain.
cursorstringoptional
Pagination cursor for file comments, taken from the previous response's `next_cursor` value.

2 status codes
200Returns an object containing the file, its comments, a success indicator, and paging metadata.
commentsarrayrequired
content_htmlunknownoptional
editorstringoptional
fileobjectrequired
okbooleanrequired
Allowed:true
pagingobjectoptional
response_metadataarrayoptional
defaultReturns an object with `ok` set to false and an `error` value when the file information cannot be retrieved or the request is invalid.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:file_not_foundfile_deletedtimezone_count_failednot_authedinvalid_authaccount_inactiveno_permissioninvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_type
okbooleanrequired
Allowed:false

Error handling

file should identify the file whose information you want to retrieve. For comment pagination, pass the previous response's next_cursor value in cursor; the first request can omit it.