Slack Files API Methods (Go Back)
This PHP class provides methods to interact with the Slack Files API. Below are instructions on how to use each method.
deleteComment(
string $fileId,
string $commentId
)
Delete a comment on a file.
completeUploadExternal(
array $files,
?string $channelId = null,
?string $initialComment = null,
?string $threadTs = null
)
Complete an external file upload.
delete(
string $fileId
)
Delete a file.
getUploadURLExternal(
string $filename,
int $length,
?string $altTxt = null,
?string $snippetType = null
)
Get an external file upload URL.
info(
string $fileId,
?int $count = null,
?string $cursor = null,
?int $limit = null,
?int $page = null
)
Get information about a file.
list(
?string $channel = null,
?int $count = null,
?int $page = null,
?bool $showFilesHiddenByLimit = null,
?string $teamId = null,
?string $tsFrom = null,
?string $tsTo = null,
?string $types = null,
?string $user = null
)
List files.
revokePublicURL(
string $fileId
)
Revoke a public file URL.
sharePublicURL(
string $fileId
)
Share a public file URL.
upload(
?string $channels = null,
?string $content = null,
$file = null,
?string $filename = null,
?string $filetype = null,
?string $initialComment = null,
?string $threadTs = null,
?string $title = null
)
Upload a file.
addRemote(
string $externalId,
string $externalUrl,
string $title,
?string $filetype = null,
$indexableFileContents = null,
$previewImage = null
)
Add a remote file.
remoteInfo(
?string $externalId = null,
?string $file = null
)
Get information about a remote file.
remoteList(
?string $channel = null,
?string $cursor = null,
?int $limit = null,
?string $tsFrom = null,
?string $tsTo = null
)
List remote files.
removeRemoteFile(
?string $externalId = null,
?string $file = null
)
Remove a remote file.
shareRemote(
string $channels,
?string $externalId = null,
?string $file = null
)
Share a remote file.
updateRemote(
string $token,
?string $externalId = null,
?string $externalUrl = null,
?string $file = null,
?string $filetype = null,
$indexableFileContents = null,
$previewImage = null,
?string $title = null
)
Update a remote file.