Work with Apps

The following are Apex classes for the Slack apps API methods.

AppsEventAuthorizationsListRequest Class 

Sends a request to get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.

Usage

See Slack’s apps.event.authorizations.list method.

AppsEventAuthorizationsListRequest Methods 

The following are methods for AppsEventAuthorizationsListRequest.

builder() 

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

Signature

1public static Slack.AppsEventAuthorizationsListRequest.Builder builder()

Return Value

Type: Slack.AppsEventAuthorizationsListRequest.Builder


AppsEventAuthorizationsListRequest.Builder Class 

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

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

AppsEventAuthorizationsListRequest.Builder Methods 

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

build() 

Signature

1public Slack.AppsEventAuthorizationsListRequest build()

Return Value

Type: Slack.AppsEventAuthorizationsListRequest

cursor(cursor) 

Signature

1public Slack.AppsEventAuthorizationsListRequest.Builder
2cursor(String cursor)

Parameters

cursor

Type: String

Return Value

Type: Slack.AppsEventAuthorizationsListRequest.Builder

eventContext(eventContext) 

Required. The event context identifies an event in each event payload sent to your app.

Signature

1public Slack.AppsEventAuthorizationsListRequest.Builder eventContext(String eventContext)

Parameters

eventContext

Type: String

Return Value

Type: Slack.AppsEventAuthorizationsListRequest.Builder

limitValue(limitValue) 

Signature

1public Slack.AppsEventAuthorizationsListRequest.Builder limitValue(Integer limitValue)

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.AppsEventAuthorizationsListRequest.Builder


AppsEventAuthorizationsListResponse Class 

Gets a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.

AppsEventAuthorizationsListResponse Methods 

This class contains standard response methods.

The following are methods for AppsEventAuthorizationsListResponse.

getAuthorizations() 

Signature

1public List<Slack.AppsEventAuthorizationsListResponse.Authorization> getAuthorizations()

Return Value

Type: List<Slack.AppsEventAuthorizationsListResponse.Authorization>

getCursorNext() 

Signature

1public String getCursorNext()

Return Value

Type: String

setAuthorizations(authorizations) 

Signature

1public void setAuthorizations(List<Slack.AppsEventAuthorizationsListResponse.Authorization> authorizations)

Parameters

authorization

Type: List<Slack.AppsEventAuthorizationsListResponse.Authorization>Add link.

Return Value

Type: void

setCursorNext(cursorNext) 

Signature

1public void setCursorNext(String cursorNext)

Parameters

Type: String

Return Value

Type: void


AppsEventAuthorizationsListResponse.Authorization Class 

Call these methods to see all the installations of your app than an event is visible to.

AppsEventAuthorizationsListResponse.Authorization Methods 

The following are methods for AppsEventAuthorizationsListResponse.Authorization.

getEnterpriseId() 

Signature

1public String getEnterpriseId()

Return Value

Type: String

getIsBot() 

Signature

1public Boolean getIsBot()

Return Value

Type: Boolean

getIsEnterpriseInstall() 

Signature

1public Boolean getIsEnterpriseInstall()

Return Value

Type: Boolean

getTeamId() 

Gets the workspace ID.

Signature

1public String getTeamId()

Return Value

Type: String

getUserId() 

Gets the ID of the Slack user.

Signature

1public String getUserId()

Return Value

Type: String

setEnterpriseId(enterpriseId) 

Sets the enterprise ID.

Signature

1public void setEnterpriseId(String enterpriseId)

Parameters

enterpriseId

Type: String

Return Value

Type: void

setIsBot(isBot) 

Signature

1public void setIsBot(Boolean isBot)

Parameters

isBot

Type: Boolean

Return Value

Type: void

setIsEnterpriseInstall(isEnterpriseInstall) 

Signature

1public void setIsEnterpriseInstall(Boolean isEnterpriseInstall)

Parameters

isEnterpriseInstall

Type: Boolean

Return Value

Type: void

setTeamId(teamId) 

Sets the workspace ID.

Signature

1public void setTeamId(String teamId)

Parameters

teamId

Type: String

Return Value

Type: void

setUserId(userId) 

Sets the ID of the Slack user.

Signature

1public void setUserId(String userId)

Parameters

userId

Type: String

Return Value

Type: void


AppsUninstallRequest Class 

Sends a request to uninstall your app from a workspace.

AppsUninstallRequest Methods 

The following are methods for AppsUninstallRequest.

builder() 

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

Signature

1public static Slack.AppsUninstallRequest.Builder builder()

Return Value

Type: Slack.AppsUninstallRequest.Builder


AppsUninstallRequest.Builder Class 

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

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

AppsUninstallRequest.Builder Methods 

The following are methods for AppsUninstallRequest.Builder.

build() 

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

Signature

1public Slack.AppsUninstallRequest build()

Return Value

Type: Slack.AppsUninstallRequest

clientId(clientId) 

Required. The client ID that’s issued when you created your Slack app.

Signature

1public Slack.AppsUninstallRequest.Builder clientId(String clientId)

Parameters

clientId

Type: String

Return Value

Type: Slack.AppsUninstallRequest.Builder

clientSecret(clientSecret) 

Required. The client secret that’s issued when you created your Slack app.

Signature

1public Slack.AppsUninstallRequest.Builder clientSecret(String clientSecret)

Parameters

clientSecret

Type: String

Return Value

Type: Slack.AppsUninstallRequest.Builder


AppsUninstallResponse Class 

Uninstall your app from a workspace.

AppsUninstallResponse Methods 

This class contains standard response methods.

Beta Feature

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.