Authorize an App

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

Sends a request to revoke a token.

AuthRevokeRequest Methods

The following are methods for AuthRevokeRequest.

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

Signature

Return Value

Type: Slack.AuthRevokeRequest.Builder


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

Return Value

Type: Slack.AuthRevokeRequest

test(test)

Signature

Parameters

test

Type: Boolean

Return Value

Type: Slack.AuthRevokeRequest.Builder


Revokes a token.

AuthRevokeResponse Methods

This class contains standard response methods.

The following are methods for AuthRevokeResponse.

isRevoked()

Signature

Return Value

Type: Boolean

setRevoked(revoked)

Signature

Parameters

revoked

Type: Boolean

Return Value

Type: void


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

Return Value

Type: Slack.AuthTeamsListRequest.Builder


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

Return Value

Type: Slack.AuthTeamsListRequest

cursor(cursor)

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

includeIcon(includeIcon)

Signature

Parameters

includeIcon

Type: Boolean

Return Value

Type: Slack.AuthTeamsListRequest.Builder

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

limitValue(limitValue)

Signature

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.AuthTeamsListRequest.Builder


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

Return Value

Type: Slack.ResponseMetadata

getTeams()

Signature

Return Value

Type: List<Slack.AuthTeamsListResponse.Team>

setResponseMetadata(responseMetadata)

Sets the response metadata.

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void

setTeams(teams)

Signature

Parameters

teams

Type: List<Slack.AuthTeamsListResponse.Team>

Return Value

Type: void


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

Return Value

Type: String

getName()

Gets the name of the workspace.

Signature

Return Value

Type: String

setId(id)

Sets the ID of the workspace.

Signature

Parameters

id

Type: String

Return Value

Type: void

setName(name)

Sets the name of the workspace.

Signature

Parameters

name

Type: String


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

Return Value

Type: Slack.AuthTestRequest.Builder


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

Return Value

Type: Slack.AuthTestRequest


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

Return Value

Type: String

getAppName()

Signature

Return Value

Type: String

getBotId()

Returns the bot ID, for example, B061F7JD2.

Signature

Return Value

Type: String

getEnterpriseId()

Signature

Return Value

Type: String

getTeam()

Signature

Return Value

Type: String

getTeamId()

Gets the ID of the workspace.

Signature

Return Value

Type: String

getUrl()

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

Signature

Return Value

Type: String

getUser()

Gets the username.

Signature

Return Value

Type: String

getUserId()

Gets the ID of the user.

Signature

Return Value

Type: String

isEnterpriseInstall()

Signature

Return Value

Type: Boolean

setAppId(appId)

Sets the ID of the app.

Signature

Parameters

appId

Type: String

Return Value

Type: void

setAppName(appName)

Sets the name of the app.

Signature

Parameters

appName

Type: String

Return Value

Type: void

setBotId(botId)

Sets the ID of the bot.

Signature

Parameters

appId

Type: String

Return Value

Type: void

setEnterpriseId(enterpriseId)

Sets the ID of the enterprise.

Signature

Parameters

enterpriseId

Type: String

Return Value

Type: void

setEnterpriseInstall(isEnterpriseInstall)

Specifies whether the installation is part of an Enterprise Grid.

Signature

Parameters

enterpriseId

Type: Boolean

Return Value

Type: void

setTeam(team)

Signature

Parameters

team

Type: String

Return Value

Type: void

setTeamId(teamId)

Sets the ID of the workspace.

Signature

Parameters

teamId

Type: String

Return Value

Type: void

setUrl(url)

Sets the URL of the workspace.

Signature

Parameters

url

Type: String

Return Value

Type: void

setUser(user)

Signature

Parameters

user

Type: String

Return Value

Type: void

setUserId(userId)

Signature

Parameters

userId

Type: String

Return Value

Type: void