Skip to content

Latest commit

 

History

History
187 lines (117 loc) · 3.18 KB

Conversations.md

File metadata and controls

187 lines (117 loc) · 3.18 KB

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.

Accept Shared Invite

acceptSharedInvite(string $channelName, ?string $channelId = null, ?bool $freeTrialAccepted = null, ?string $inviteId = null, ?bool $isPrivate = null, ?string $teamId = null)

Accepts a shared channel invite.

Approve Shared Invite

approveSharedInvite(string $inviteId, ?string $targetTeam = null)

Approves a Slack Connect shared channel invite.

Archive

archive(string $channel)

Archives a conversation.

Close

close(string $channel)

Closes a conversation.

Create

create(string $name, bool $isPrivate = false, ?string $teamId = null)

Creates a public or private channel.

Decline Shared Invite

declineSharedInvite(string $inviteId, ?string $targetTeam = null)

Declines a Slack Connect shared channel invite.

History

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

info(string $channel, ?bool $includeLocale = null, ?bool $includeNumMembers = null)

Fetches information about a conversation.

Invite To

inviteTo(string $channel, string $users)

Invites users to a conversation.

Invite To Shared

inviteToShared(string $channel, ?array $emails = null, ?bool $externalLimited = null, ?array $userIds = null)

Invites users to a shared channel.

Join

join(string $channel)

Joins a conversation.

Kick

kick(string $channel, string $user)

Removes a user from a conversation.

Leave

leave(string $channel)

Leaves a conversation.

List

list(?string $cursor = null, ?bool $excludeArchived = null, ?int $limit = null, ?string $teamId = null, ?string $types = null)

Lists conversations.

List Connect Invites

listConnectInvites(?int $count = null, ?string $cursor = null, ?string $teamId = null)

Lists Slack Connect channel invites.

Mark

mark(string $channel, string $ts)

Sets the read cursor for a conversation.

Members

members(string $channel, ?string $cursor = null, ?int $limit = null)

Lists members of a conversation.

Open

open(?string $channel = null, ?bool $preventCreation = null, ?bool $returnIM = null, ?string $users = null)

Opens a direct message or multi-person direct message.

Rename

rename(string $channel, string $name)

Renames a conversation.

Replies

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.

Set Purpose

setPurpose(string $channel, string $purpose)

Sets the purpose of a conversation.

Set Topic

setTopic(string $channel, string $topic)

Sets the topic of a conversation.

Unarchive

unarchive(string $channel)

Unarchives a conversation.