Slack Conversations API Methods (Go Back)
This PHP class provides methods to interact with the Slack Conversations API. Below are instructions on how to use each method.
acceptSharedInvite(string $channelName, ?string $channelId = null, ?bool $freeTrialAccepted = null, ?string $inviteId = null, ?bool $isPrivate = null, ?string $teamId = null)
Accepts a shared channel invite.
approveSharedInvite(string $inviteId, ?string $targetTeam = null)
Approves a Slack Connect shared channel invite.
archive(string $channel)
Archives a conversation.
close(string $channel)
Closes a conversation.
create(string $name, bool $isPrivate = false, ?string $teamId = null)
Creates a public or private channel.
declineSharedInvite(string $inviteId, ?string $targetTeam = null)
Declines a Slack Connect shared channel invite.
history(string $channel, ?string $cursor = null, ?bool $includeAllMetadata = null, ?bool $inclusive = null, ?string $latest = null, ?int $limit = null, ?string $oldest = null)
Fetches conversation history.
info(string $channel, ?bool $includeLocale = null, ?bool $includeNumMembers = null)
Fetches information about a conversation.
inviteTo(string $channel, string $users)
Invites users to a conversation.
inviteToShared(string $channel, ?array $emails = null, ?bool $externalLimited = null, ?array $userIds = null)
Invites users to a shared channel.
join(string $channel)
Joins a conversation.
kick(string $channel, string $user)
Removes a user from a conversation.
leave(string $channel)
Leaves a conversation.
list(?string $cursor = null, ?bool $excludeArchived = null, ?int $limit = null, ?string $teamId = null, ?string $types = null)
Lists conversations.
listConnectInvites(?int $count = null, ?string $cursor = null, ?string $teamId = null)
Lists Slack Connect channel invites.
mark(string $channel, string $ts)
Sets the read cursor for a conversation.
members(string $channel, ?string $cursor = null, ?int $limit = null)
Lists members of a conversation.
open(?string $channel = null, ?bool $preventCreation = null, ?bool $returnIM = null, ?string $users = null)
Opens a direct message or multi-person direct message.
rename(string $channel, string $name)
Renames a conversation.
replies(string $channel, string $ts, ?string $cursor = null, ?bool $includeAllMetadata = null, ?bool $inclusive = null, ?string $latest = null, ?int $limit = null, ?string $oldest = null)
Fetches thread replies.
setPurpose(string $channel, string $purpose)
Sets the purpose of a conversation.
setTopic(string $channel, string $topic)
Sets the topic of a conversation.
unarchive(string $channel)
Unarchives a conversation.