Work with Calls

The following are Apex classes for the Slack calls API methods. These classes enable you to integrate your calls with Slack using the Calls API.

Represents a call on Slack.

Call Methods

The following are methods for Call.

getChannels()

Gets the channel that initiated the call.

Signature

Return Value

Type: List<String>

getDateEnd()

Gets the call end time in UTC UNIX timestamp format.

Signature

Return Value

Type: Integer

getDateStart()

Gets the call start time in UTC UNIX timestamp format.

Signature

Return Value

Type: Integer

getDesktopAppJoinUrl()

Gets the Slack clients that launched the call. For example, callapp://join/0987654321.

Signature

Return Value

Type: String

getExternalDisplayId()

Gets the external display ID. For example, 705-292-868.

Signature

Return Value

Type: String

getExternalUniqueId()

Gets the unique ID created by your app for your users.

Signature

Return Value

Type: String

getId()

Gets the call ID.

Signature

Return Value

Type: String

getJoinUrl()

Gets the URL required for a client to join the call.

Signature

Return Value

Type: String

getTitle()

Gets the name of the call.

Signature

Return Value

Type: String

getUsers()

Gets a list of call participants.

Signature

Return Value

Type: List<Slack.CallParticipant>

setChannels(channels)

Sets the channel that initiates the call.

Signature

Parameters

channels

Type: List<String>

Return Value

Type: void

setDateEnd(dateEnd)

Sets the call end time in UTC UNIX timestamp format.

Signature

Parameters

dateEnd

Type: Integer

Return Value

Type: void

setDateStart(dateStart)

Sets the call start time in UTC UNIX timestamp format.

Signature

Parameters

dateStart

Type: Integer

Return Value

Type: void

setDesktopAppJoinUrl(desktopAppJoinUrl)

Sets the Slack clients that launched the call. For example, callapp://join/0987654321.

Signature

Parameters

desktopAppJoinUrl

Type: String

Return Value

Type: void

setExternalDisplayId(externalDisplayId)

Sets the external display ID.

Signature

Parameters

externalDisplayId

Type: String

Return Value

Type: void

setExternalUniqueId(externalUniqueId)

Sets the unique ID created by your app for your users.

Signature

Parameters

externalUniqueId

Type: String

Return Value

Type: void

setId(id)

Sets the call ID.

Signature

Parameters

id

Type: String

Return Value

Type: void

setJoinUrl(joinUrl)

Sets the URL required for a client to join the call.

Signature

Parameters

joinUrl

Type: String

Return Value

Type: void

setTitle(title)

Sets the name of the call.

Signature

Parameters

title

Type: String

Return Value

Type: void

setUsers(users)

Sets the call participants.

Signature

Parameters

users

Type: List<Slack.CallParticipant>

Return Value

Type: void


Represent a user on a call.

CallParticipant Class

The following are methods for CallParticipant.

getAvatarUrl()

Gets the URL for the call participant's avatar.

Signature

Return Value

Type: String

getDisplayName()

Gets the display name for the call participant.

Signature

Return Value

Type: String

getExternalId()

Gets the external ID for the call participant. The external ID is a unique ID that your app creates for your users.

Signature

Return Value

Type: String

getSlackId()

Gets the Slack ID for the call participant.

Signature

Return Value

Type: String

setAvatarUrl(avatarUrl)

Sets the URL for the call participant's avatar.

Signature

Parameters

avatarUrl

Type: String

Return Value

Type: void

setDisplayName(displayName)

Sets the display name for the call participant.

Signature

Parameters

displayName

Type: String

Return Value

Type: void

setExternalId(externalId)

Sets the external ID for the call participant.

Signature

Parameters

externalId

Type: String

Return Value

Type: void

setSlackId(slackId)

Sets the Slack ID for the call participant.

Signature

Parameters

slackId

Type: String

Return Value

Type: void


Sends a request to register a new call.

Usage

See Slack's calls.add method.

CallsAddRequest Methods

The following are methods for CallsAddRequest.

builder()

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.CallsAddRequest.Builder


Contains methods to build an instance of the Slack.CallsAddRequest class.

A Builder object is obtained by invoking one of the CallsAddRequest.Builder methods defined by the CallsAddRequest class.

CallsAddRequest.Builder Methods

The following are methods for CallsAddRequest.Builder. These methods are optional unless specified otherwise.

build()

Required. Builds an instance of the Slack.CallsAddRequest class.

Signature

Return Value

Type: Slack.CallsAddRequest

createdBy(createdBy)

The Slack user ID of the user who created the call. When this method is called with a user token, createdBy is optional and defaults to the authenticated user of the token. Otherwise, the field is required.

Signature

Parameters

createdBy

Type: String

Return Value

Type: Slacks.CallsAddRequest.Builder

dateStart(dateStart)

Call start time in UTC UNIX timestamp format.

Signature

Parameters

dateStart

Type: Integer

Return Value

Type: Slack.CallsAddRequest.Builder

desktopAppJoinUrl(desktopAppJoinUrl)

The URL that's used to launch the 3rd-party call for the Slack clients.

Signature

Parameters

desktopAppJoinUrl

Type: String

Return Value

Type: Slack.CallsAddRequest.Builder

externalDisplayId(externalDisplayId)

An optional ID supplied by the 3rd-party call provider. This ID is displayed in the call object.

Signature

Parameters

externalDisplayId

Type: String

Return Value

Type: Slack.CallsAddRequest.Builder

externalUniqueId(externalUniqueId)

Required. An ID supplied by the 3rd-party call provider. It must be unique across all calls from that service.

Signature

Parameters

externalUniqueId

Type: String

Return Value

Type: Slack.CallsAddRequest.Builder

joinUrl(joinUrl)

Required. The URL required for a client to join the call.

Signature

joinUrl

Type: String

Return Value

Type: Slack.CallsAddRequest.Builder

title(title)

The name for the call, which can be a short description.

Signature

Parameters

title

Type: String

Return Value

Type: Slack.CallsAddRequest.Builder

users(users)

The list of call participants.

Signature

Parameters

users

Type: List<Slack.CallParticipant>

Return Value

Type: Slack.CallsAddRequest.Builder


Registers a new call.

CallsAddResponse Method

This class contains standard response methods.

The following are methods for CallsAddResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets a call to be registered. setCall registers the details of the call with Slack.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void


Sends a request to end a call.

Usage

See Slack's calls.add method.

CallsEndRequest Methods

The following are methods for CallsEndRequest.

builder()

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.CallsEndRequest.Builder


Contains methods to build an instance of the Slack.CallsEndRequest class.

A Builder object is obtained by invoking one of the CallsEndRequest.Builder methods defined by the CallsEndRequest class.

CallsEndRequest.Builder Methods

The following are methods for CallsEndRequest.Builder. These methods are optional unless specified otherwise.

build()

Required. Returns an instance of the Slack.CallsEndRequest object.

Signature

Return Value

Type: Slack.CallsEndRequest

duration(duration)

Call duration in seconds.

Signature

Parameters

duration

Type: Integer

Return Value

Type: Slack.CallsEndRequest.Builder

id(id)

Required. The ID that's returned when registering a call using CallsAddRequest.

Signature

Parameters

id

Type: String

Return Value

Type: Slack.CallsEndRequest.Builder


Ends a call.

CallsEndResponse Methods

This class contains standard response methods.

The following are methods for CallsEndResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets the call to be terminated.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void


Sends a request to return information about a call.

Usage

See Slack's calls.info method.

CallsInfoRequest Methods

The following are methods for CallsInfoRequest.

builder()

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.CallsInfoRequest.Builder


Contains methods to build an instance of the Slack.CallsInfoRequest class.

A Builder object is obtained by invoking one of the CallsInfoRequest.Builder methods defined by the CallsInfoRequest class.

CallsInfoRequest.Builder Methods

The following are methods for CallsInfoRequest.Builder. These methods are optional unless specified otherwise.

build()

Required. Returns an instance of the Slack.CallsInfoRequesxt object.

Signature

Return Value

Type: Slack.CallsInfoRequest

id(id)

Required. The ID of the call that's returned by CallsAddRequest.

Signature

Parameters

id

Type: String

Return Value

Type: Slack.CallsInfoRequest.Builder


Returns information about a call.

CallsInfoResponse Methods

This class contains standard response methods.

The following are methods for CallsInfoResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets the call from which to get information.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void


Sends a request to register new participants that are added to a call.

Usage

See Slack's calls.participants.add method.

CallsParticipantsAddRequest Methods

The following are methods for CallsParticipantsAddRequest.

builder()

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.CallsParticipantsAddRequest.Builder


Contains methods to build an instance of the Slack.CallsParticipantsAddRequest class.

A Builder object is obtained by invoking one of the CallsParticipantsAddRequest.Builder methods defined by the CallsParticipantsAddRequest class.

CallsParticipantsAddRequest.Builder Methods

The following are methods for CallsParticipantsAddRequest.Builder.

build()

Required. Returns an instance of the Slack.CallsParticipantsAddRequest object.

Signature

Return Value

Type: Slack.CallsParticipantsAddRequest

id(id)

Required. The ID that's returned by CallsAddRequest.

Signature

Parameters

id

Type: String

Return Value

Type: Slack.CallsParticipantsAddRequest.Builder

users(users)

Required. The list of users to add as participants in the call.

Signature

Parameters

users

Type: List<Slack.CallParticipant>

Return Value

Type: Slack.CallsParticipantsAddRequest.Builder


Registers new participants that are added to a call.

CallsParticipantsAddResponse Methods

This class contains standard response methods.

The following are methods for CallsParticipantsAddResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets the call for which to register new participants.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void


Sends a request to remove participants in the call.

Usage

See Slack's calls.participants.remove method.

CallsParticipantsRemoveRequest Methods

The following are methods for CallsParticipantsRemoveRequest.

builder()

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Type: Slack.CallsParticipantsRemoveRequest.Builder


Contains methods to build an instance of the Slack.CallsParticipantsRemoveRequest class.

A Builder object is obtained by invoking one of the CallsParticipantsRemoveRequest.Builder methods defined by the CallsParticipantsRemoveRequest class.

CallsParticipantsRemoveRequest.Builder Methods

The following are methods for CallsParticipantsRemoveRequest.Builder.

build()

Required. Returns an instance of the Slack.CallsParticipantsRemoveRequest object.

Signature

Return Value

Type: Slack.CallsParticipantsRemoveRequest

id(id)

Required. The ID that's returned by CallsAddRequest.

Signature

Parameters

id

Type: String

Return Value

Type: Type: Slack.CallsParticipantsRemoveRequest.Builder

users(users)

Required. The list of users to remove as participants in the call.

Signature

Parameters

users

Type: List<Slack.CallParticipant>

Return Value

Type: Slack.CallsParticipantsRemoveRequest.Builder


Registers participants removed from a Call.

CallsParticipantsRemoveResponse Methods

This class contains standard response methods.

The following are methods for CallsParticipantsRemoveResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets the call from which to remove participants.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void


Sends a request to update information about a call.

CallsUpdateRequest Methods

The following are methods for CallsUpdateRequest.

builder()

Signature

Return Value

Type: Slack.CallsUpdateRequest.Builder


Contains methods to build an instance of the Slack.CallsUpdateRequest class.

A Builder object is obtained by invoking one of the CallsUpdateRequest.Builder methods defined by the CallsUpdateRequest class.

CallsUpdateRequest.Builder Methods

The following are methods for CallsUpdateRequest.Builder. These methods are optional unless specified otherwise.

build()

Required. Returns an instance of the Slack.CallsUpdateRequest object.

Signature

Return Value

Type: Slack.CallsUpdateRequest

desktopAppJoinUrl(desktopAppJoinUrl)

Signature

Parameters

desktopAppJoinUrl

Type: String

Return Value

Type: Slack.CallsUpdateRequest.Builder

id(id)

Required. The ID that's returned by CallsAddRequest.

Signature

Parameters

id

Type: String

Return Value

Type: Slack.CallsUpdateRequest.Builder

joinUrl(joinUrl)

Signature

Parameters

joinUrl

Type: String

Return Value

Type: Slack.CallsUpdateRequest.Builder

title(title)

Signature

Parameters

title

Type: String

Return Value

Type: Slack.CallsUpdateRequest.Builder

Updates information about a call.

CallsUpdateResponse Methods

This class contains standard response methods.

The following are methods for CallsUpdateResponse.

getCall()

Gets information about the call.

Signature

Return Value

Type: Slack.Call

getResponseMetadata()

Signature

Return Value

Type: Slack.ResponseMetadata

setCall(call)

Sets the call for which to update information.

Signature

Parameters

call

Type: Slack.Call

Return Value

Type: void

setResponseMetadata(responseMetadata)

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void