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 .
Call Class
Represents a call on Slack.
Call Methods
The following are methods for Call.
getChannels()
Gets the channel that initiated the call.
Signature
1 public List < String > getChannels ( )
Return Value
Type: List<String>
getDateEnd()
Gets the call end time in UTC UNIX timestamp format.
Signature
1 public Integer getDateEnd ( )
Return Value
Type: Integer
getDateStart()
Gets the call start time in UTC UNIX timestamp format.
Signature
1 public Integer getDateStart ( )
Return Value
Type: Integer
getDesktopAppJoinUrl()
Gets the Slack clients that launched the call. For example, callapp://join/0987654321.
Signature
1 public String getDesktopAppJoinUrl ( )
Return Value
Type: String
getExternalDisplayId()
Gets the external display ID. For example, 705-292-868.
Signature
1 public String getExternalDisplayId ( )
Return Value
Type: String
getExternalUniqueId()
Gets the unique ID created by your app for your users.
Signature
1 public String getExternalUniqueId ( )
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
1 public String getJoinUrl ( )
Return Value
Type: String
getTitle()
Gets the name of the call.
Signature
1 public String getTitle ( )
Return Value
Type: String
getUsers()
Gets a list of call participants.
Signature
1 public List < Slack . CallParticipant > getUsers ( )
Return Value
Type: List<Slack.CallParticipant >
setChannels(channels)
Sets the channel that initiates the call.
Signature
1 public void setChannels ( List < String > channels )
Parameters
channels
Type: List<String>
Return Value
Type: void
setDateEnd(dateEnd)
Sets the call end time in UTC UNIX timestamp format.
Signature
1 public void setDateEnd ( Integer dateEnd )
Parameters
dateEnd
Type: Integer
Return Value
Type: void
setDateStart(dateStart)
Sets the call start time in UTC UNIX timestamp format.
Signature
1 public void setDateStart ( Integer dateStart )
Parameters
dateStart
Type: Integer
Return Value
Type: void
setDesktopAppJoinUrl(desktopAppJoinUrl)
Sets the Slack clients that launched the call. For example, callapp://join/0987654321.
Signature
1 public void setDesktopAppJoinUrl ( String desktopAppJoinUrl )
Parameters
desktopAppJoinUrl
Type: String
Return Value
Type: void
setExternalDisplayId(externalDisplayId)
Sets the external display ID.
Signature
1 public void setExternalDisplayId ( String externalDisplayId )
Parameters
externalDisplayId
Type: String
Return Value
Type: void
setExternalUniqueId(externalUniqueId)
Sets the unique ID created by your app for your users.
Signature
1 public void setExternalUniqueId ( String externalUniqueId )
Parameters
externalUniqueId
Type: String
Return Value
Type: void
setId(id)
Sets the call ID.
Signature
1 public void setId ( String id )
Parameters
id
Type: String
Return Value
Type: void
setJoinUrl(joinUrl)
Sets the URL required for a client to join the call.
Signature
1 public void setJoinUrl ( String joinUrl )
Parameters
joinUrl
Type: String
Return Value
Type: void
setTitle(title)
Sets the name of the call.
Signature
1 public void setTitle ( String title )
Parameters
title
Type: String
Return Value
Type: void
setUsers(users)
Sets the call participants.
Signature
1 public void setUsers ( List < Slack . CallParticipant > users )
Parameters
users
Type: List<Slack.CallParticipant >
Return Value
Type: void
CallParticipant Class
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
1 public String getAvatarUrl ( )
Return Value
Type: String
getDisplayName()
Gets the display name for the call participant.
Signature
1 public String getDisplayName ( )
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
1 public String getExternalId ( )
Return Value
Type: String
getSlackId()
Gets the Slack ID for the call participant.
Signature
1 public String getSlackId ( )
Return Value
Type: String
setAvatarUrl(avatarUrl)
Sets the URL for the call participant’s avatar.
Signature
1 public void setAvatarUrl ( String avatarUrl )
Parameters
avatarUrl
Type: String
Return Value
Type: void
setDisplayName(displayName)
Sets the display name for the call participant.
Signature
1 public void setDisplayName ( String displayName )
Parameters
displayName
Type: String
Return Value
Type: void
setExternalId(externalId)
Sets the external ID for the call participant.
Signature
1 public void setExternalId ( String externalId )
Parameters
externalId
Type: String
Return Value
Type: void
setSlackId(slackId)
Sets the Slack ID for the call participant.
Signature
1 public void setSlackId ( String slackId )
Parameters
slackId
Type: String
Return Value
Type: void
CallsAddRequest Class
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
1 public static Slack . CallsAddRequest . Builder builder ( )
Return Value
Type: Slack.CallsAddRequest.Builder
CallsAddRequest.Builder Class
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
1 public Slack . CallsAddRequest build ( )
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
1 public Slack . CallsAddRequest . Builder createdBy ( String createdBy )
Parameters
createdBy
Type: String
Return Value
Type: Slacks.CallsAddRequest.Builder
dateStart(dateStart)
Call start time in UTC UNIX timestamp format.
Signature
1 public Slack . CallsAddRequest . Builder dateStart ( Integer dateStart )
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
1 public Slack . CallsAddRequest . Builder desktopAppJoinUrl ( String desktopAppJoinUrl )
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
1 public Slack . CallsAddRequest . Builder externalDisplayId ( String externalDisplayId )
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
1 public Slack . CallsAddRequest . Builder externalUniqueId ( String externalUniqueId )
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
1 public Slack . CallsAddRequest . Builder title ( String title )
Parameters
title
Type: String
Return Value
Type: Slack.CallsAddRequest.Builder
users(users)
The list of call participants.
Signature
1 public Slack . CallsAddRequest . Builder users ( List < Slack . CallParticipant > users )
Parameters
users
Type: List<Slack.CallParticipant >
Return Value
Type: Slack.CallsAddRequest.Builder
CallsAddResponse Class
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
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets a call to be registered. setCall registers the details of the call with Slack.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
CallsEndRequest Class
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
1 public static Slack . CallsEndRequest . Builder builder ( )
Return Value
Type: Slack.CallsEndRequest.Builder
CallsEndRequest.Builder Class
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
1 public Slack . CallsEndRequest build ( )
Return Value
Type: Slack.CallsEndRequest
duration(duration)
Call duration in seconds.
Signature
1 public Slack . CallsEndRequest . Builder duration ( Integer duration )
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
1 public Slack . CallsEndRequest . Builder id ( String id )
Parameters
id
Type: String
Return Value
Type: Slack.CallsEndRequest.Builder
CallsEndResponse Class
Ends a call.
CallsEndResponse Methods
This class contains standard response methods .
The following are methods for CallsEndResponse.
getCall()
Gets information about the call.
Signature
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets the call to be terminated.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
CallsInfoRequest Class
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
1 public static Slack . CallsInfoRequest . Builder builder ( )
Return Value
Type: Slack.CallsInfoRequest.Builder
CallsInfoRequest.Builder Class
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
1 public Slack . CallsInfoRequest build ( )
Return Value
Type: Slack.CallsInfoRequest
id(id)
Required. The ID of the call that’s returned by CallsAddRequest.
Signature
1 public Slack . CallsInfoRequest . Builder id ( String id )
Parameters
id
Type: String
Return Value
Type: Slack.CallsInfoRequest.Builder
CallsInfoResponse Class
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
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets the call from which to get information.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
CallsParticipantsAddRequest Class
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
1 public static Slack . CallsParticipantsAddRequest . Builder builder ( )
Return Value
Type: Slack.CallsParticipantsAddRequest.Builder
CallsParticipantsAddRequest.Builder Class
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
1 public Slack . CallsParticipantsAddRequest build ( )
Return Value
Type: Slack.CallsParticipantsAddRequest
id(id)
Required. The ID that’s returned by CallsAddRequest.
Signature
1 public Slack . CallsParticipantsAddRequest . Builder id ( String id )
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
1 public Slack . CallsParticipantsAddRequest . Builder users ( List < Slack . CallParticipant > users )
Parameters
users
Type: List<Slack.CallParticipant >
Return Value
Type: Slack.CallsParticipantsAddRequest.Builder
CallsParticipantsAddResponse Class
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
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets the call for which to register new participants.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
CallsParticipantsRemoveRequest Class
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
1 public static Slack . CallsParticipantsRemoveRequest . Builder builder ( )
Return Value
Type: Type: Slack.CallsParticipantsRemoveRequest.Builder
CallsParticipantsRemoveRequest.Builder Class
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
1 public Slack . CallsParticipantsRemoveRequest build ( )
Return Value
Type: Slack.CallsParticipantsRemoveRequest
id(id)
Required. The ID that’s returned by CallsAddRequest.
Signature
1 public Slack . CallsParticipantsRemoveRequest . Builder id ( String id )
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
1 public Slack . CallsParticipantsRemoveRequest . Builder users ( List < Slack . CallParticipant > users )
Parameters
users
Type: List<Slack.CallParticipant >
Return Value
Type: Slack.CallsParticipantsRemoveRequest.Builder
CallsParticipantsRemoveResponse Class
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
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets the call from which to remove participants.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
CallsUpdateRequest Class
Sends a request to update information about a call.
CallsUpdateRequest Methods
The following are methods for CallsUpdateRequest.
builder()
Signature
1 public static Slack . CallsUpdateRequest . Builder builder ( )
Return Value
Type: Slack.CallsUpdateRequest.Builder
CallsUpdateRequest.Builder Class
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
1 public Slack . CallsUpdateRequest build ( )
Return Value
Type: Slack.CallsUpdateRequest
desktopAppJoinUrl(desktopAppJoinUrl)
Signature
1 public Slack . CallsUpdateRequest . Builder desktopAppJoinUrl ( String desktopAppJoinUrl )
Parameters
desktopAppJoinUrl
Type: String
Return Value
Type: Slack.CallsUpdateRequest.Builder
id(id)
Required. The ID that’s returned by CallsAddRequest.
Signature
1 public Slack . CallsUpdateRequest . Builder id ( String id )
Parameters
id
Type: String
Return Value
Type: Slack.CallsUpdateRequest.Builder
joinUrl(joinUrl)
Signature
1 public Slack . CallsUpdateRequest . Builder joinUrl ( String joinUrl )
Parameters
joinUrl
Type: String
Return Value
Type: Slack.CallsUpdateRequest.Builder
title(title)
Signature
1 public Slack . CallsUpdateRequest . Builder title ( String title )
Parameters
title
Type: String
Return Value
Type: Slack.CallsUpdateRequest.Builder
CallsUpdateResponse Class
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
1 public Slack . Call getCall ( )
Return Value
Type: Slack.Call
getResponseMetadata()
Signature
1 public Slack . ResponseMetadata getResponseMetadata ( )
Return Value
Type: Slack.ResponseMetadata
setCall(call)
Sets the call for which to update information.
Signature
1 public void setCall ( Slack . Call call )
Parameters
call
Type: Slack.Call
Return Value
Type: void
setResponseMetadata(responseMetadata)
Signature
1 public void setResponseMetadata ( Slack . ResponseMetadata responseMetadata )
Parameters
responseMetadata
Type: Slack.ResponseMetadata
Return Value
Type: void
This feature is not generally available. It is not part of your purchased Services. This feature is subject to change, may be discontinued with no notice at any time in SFDC’s sole discretion, and SFDC may never make this feature generally available. Make your purchase decisions only on the basis of generally available products and features. This feature is made available on an AS IS basis and use of this feature is at your sole risk.