Authorize an App

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

AuthRevokeRequest Class 

Sends a request to revoke a token.

AuthRevokeRequest Methods 

The following are methods for AuthRevokeRequest.

1builder()

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

Signature

1public static Slack.AuthRevokeRequest.Builder builder()

Return Value

Type: Slack.AuthRevokeRequest.Builder


AuthRevokeRequest.Builder Class 

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

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

AuthRevokeRequest.Builder Methods 

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

build() 

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

Signature

1public Slack.AuthRevokeRequest build()

Return Value

Type: Slack.AuthRevokeRequest

test(test) 

Signature

1public Slack.AuthRevokeRequest.Builder test(Boolean test)

Parameters

test

Type: Boolean

Return Value

Type: Slack.AuthRevokeRequest.Builder


AuthRevokeResponse Class 

Revokes a token.

AuthRevokeResponse Methods 

This class contains standard response methods.

The following are methods for AuthRevokeResponse.

isRevoked() 

Signature

1public Boolean isRevoked()

Return Value

Type: Boolean

setRevoked(revoked) 

Signature

1public void setRevoked(Boolean revoked)

Parameters

revoked

Type: Boolean

Return Value

Type: void


AuthTeamsListRequest Class 

Sends a request to list the workspaces a token can access.

AuthTeamsListRequest Methods 

The following are methods for AuthTeamsListRequest.

builder() 

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

Signature

1public static Slack.AuthTeamsListRequest.Builder builder()

Return Value

Type: Slack.AuthTeamsListRequest.Builder


AuthTeamsListRequest.Builder Class 

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

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

AuthTeamsListRequest.Builder Methods 

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

build() 

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

Signature

1public Slack.AuthTeamsListRequest build()

Return Value

Type: Slack.AuthTeamsListRequest

cursor(cursor) 

Signature

1public Slack.AuthTeamsListRequest.Builder cursor(String cursor)

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

includeIcon(includeIcon) 

Signature

1public Slack.AuthTeamsListRequest.Builder includeIcon(Boolean includeIcon)

Parameters

includeIcon

Type: Boolean

Return Value

Type: Slack.AuthTeamsListRequest.Builder

Signature

1public Slack.AuthTeamsListRequest.Builder cursor(String cursor)

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

limitValue(limitValue) 

Signature

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

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.AuthTeamsListRequest.Builder


AuthTeamsListResponse Class 

Lists the workspaces a token can access.

AuthTeamsListResponse Methods 

This class contains standard response methods.

The following are methods for AuthTeamsListResponse.

getResponseMetadata() 

Gets the response metadata.

Signature

1public Slack.ResponseMetadata getResponseMetadata()

Return Value

Type: Slack.ResponseMetadata

getTeams() 

Signature

1public List<Slack.AuthTeamsListResponse.Team> getTeams()

Return Value

Type: List<Slack.AuthTeamsListResponse.Team>

setResponseMetadata(responseMetadata) 

Sets the response metadata.

Signature

1public void setResponseMetadata(Slack.ResponseMetadata responseMetadata)

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void

setTeams(teams) 

Signature

1public void setTeams(List<Slack.AuthTeamsListResponse.Team> teams)

Parameters

teams

Type: List<Slack.AuthTeamsListResponse.Team>

Return Value

Type: void


AuthTeamsListResponse.Team Class 

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

A Team object is obtained by invoking one of the AuthTeamsListResponse.Team methods defined by the AuthTeamsListResponse class.

AuthTeamsListResponse.Team Methods 

The following are methods for AuthTeamsListResponse.Team.

getId() 

Gets the ID of the workspace.

Signature

1public String getId()

Return Value

Type: String

getName() 

Gets the name of the workspace.

Signature

1public String getName()

Return Value

Type: String

setId(id) 

Sets the ID of the workspace.

Signature

1public void setId(String id)

Parameters

id

Type: String

Return Value

Type: void

setName(name) 

Sets the name of the workspace.

Signature

1public void setName(String name)

Parameters

name

Type: String


AuthTestRequest Class 

Sends a request to check the authentication and identity.

AuthTestRequest Methods 

The following are methods for AuthTestRequest.

builder() 

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

Signature

1public static Slack.AuthTestRequest.Builder builder()

Return Value

Type: Slack.AuthTestRequest.Builder


AuthTestRequest.Builder Class 

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

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

AuthTestRequest.Builder Methods 

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

build() 

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

Signature

1public Slack.AuthTestRequest build()

Return Value

Type: Slack.AuthTestRequest


AuthTestResponse Class 

Checks the authentication and identity.

AuthTestResponse Methods 

This class contains standard response methods.

The following are methods for AuthTestResponse.

getAppId() 

Returns the app ID, for example, A161CLERW.

Signature

1public String getAppId()

Return Value

Type: String

getAppName() 

Signature

1public String getAppName()

Return Value

Type: String

getBotId() 

Returns the bot ID, for example, B061F7JD2.

Signature

1public String getBotId()

Return Value

Type: String

getEnterpriseId() 

Signature

1public String getEnterpriseId()

Return Value

Type: String

getTeam() 

Signature

1public String getTeam()

Return Value

Type: String

getTeamId() 

Gets the ID of the workspace.

Signature

1public String getTeamId()

Return Value

Type: String

getUrl() 

Gets the workspace URL, for example, myteam.slack.com.

Signature

1public String getUrl()

Return Value

Type: String

getUser() 

Gets the username.

Signature

1public String getUser()

Return Value

Type: String

getUserId() 

Gets the ID of the user.

Signature

1public String getUserId()

Return Value

Type: String

isEnterpriseInstall() 

Signature

1public Boolean isEnterpriseInstall()

Return Value

Type: Boolean

setAppId(appId) 

Sets the ID of the app.

Signature

1public void setAppId(String appId)

Parameters

appId

Type: String

Return Value

Type: void

setAppName(appName) 

Sets the name of the app.

Signature

1public void setAppName(String appName)

Parameters

appName

Type: String

Return Value

Type: void

setBotId(botId) 

Sets the ID of the bot.

Signature

1public void setBotId(String botId)

Parameters

appId

Type: String

Return Value

Type: void

setEnterpriseId(enterpriseId) 

Sets the ID of the enterprise.

Signature

1public void setEnterpriseId(String enterpriseId)

Parameters

enterpriseId

Type: String

Return Value

Type: void

setEnterpriseInstall(isEnterpriseInstall) 

Specifies whether the installation is part of an Enterprise Grid.

Signature

1public void setEnterpriseInstall(Boolean isEnterpriseInstall)

Parameters

enterpriseId

Type: Boolean

Return Value

Type: void

setTeam(team) 

Signature

1public void setTeam(String team)

Parameters

team

Type: String

Return Value

Type: void

setTeamId(teamId) 

Sets the ID of the workspace.

Signature

1public void setTeamId(String teamId)

Parameters

teamId

Type: String

Return Value

Type: void

setUrl(url) 

Sets the URL of the workspace.

Signature

1public void setUrl(String url)

Parameters

url

Type: String

Return Value

Type: void

setUser(user) 

Signature

1public void setUser(String user)

Parameters

user

Type: String

Return Value

Type: void

setUserId(userId) 

Signature

1public void setUserId(String userId)

Parameters

userId

Type: String

Return Value

Type: void

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.