Authorize an App

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

Sends a request to revoke a token.

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.

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

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

Signature

Return Value

Type: Slack.AuthRevokeRequest

Signature

Parameters

test

Type: Boolean

Return Value

Type: Slack.AuthRevokeRequest.Builder


Revokes a token.

This class contains standard response methods.

The following are methods for AuthRevokeResponse.

Signature

Return Value

Type: Boolean

Signature

Parameters

revoked

Type: Boolean

Return Value

Type: void


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

The following are methods for AuthTeamsListRequest.

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.

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

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

Signature

Return Value

Type: Slack.AuthTeamsListRequest

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

Signature

Parameters

includeIcon

Type: Boolean

Return Value

Type: Slack.AuthTeamsListRequest.Builder

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.AuthTeamsListRequest.Builder

Signature

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.AuthTeamsListRequest.Builder


Lists the workspaces a token can access.

This class contains standard response methods.

The following are methods for AuthTeamsListResponse.

Gets the response metadata.

Signature

Return Value

Type: Slack.ResponseMetadata

Signature

Return Value

Type: List<Slack.AuthTeamsListResponse.Team>

Sets the response metadata.

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void

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.

The following are methods for AuthTeamsListResponse.Team.

Gets the ID of the workspace.

Signature

Return Value

Type: String

Gets the name of the workspace.

Signature

Return Value

Type: String

Sets the ID of the workspace.

Signature

Parameters

id

Type: String

Return Value

Type: void

Sets the name of the workspace.

Signature

Parameters

name

Type: String


Sends a request to check the authentication and identity.

The following are methods for AuthTestRequest.

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.

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

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

Signature

Return Value

Type: Slack.AuthTestRequest


Checks the authentication and identity.

This class contains standard response methods.

The following are methods for AuthTestResponse.

Returns the app ID, for example, A161CLERW.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Returns the bot ID, for example, B061F7JD2.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Gets the ID of the workspace.

Signature

Return Value

Type: String

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

Signature

Return Value

Type: String

Gets the username.

Signature

Return Value

Type: String

Gets the ID of the user.

Signature

Return Value

Type: String

Signature

Return Value

Type: Boolean

Sets the ID of the app.

Signature

Parameters

appId

Type: String

Return Value

Type: void

Sets the name of the app.

Signature

Parameters

appName

Type: String

Return Value

Type: void

Sets the ID of the bot.

Signature

Parameters

appId

Type: String

Return Value

Type: void

Sets the ID of the enterprise.

Signature

Parameters

enterpriseId

Type: String

Return Value

Type: void

Specifies whether the installation is part of an Enterprise Grid.

Signature

Parameters

enterpriseId

Type: Boolean

Return Value

Type: void

Signature

Parameters

team

Type: String

Return Value

Type: void

Sets the ID of the workspace.

Signature

Parameters

teamId

Type: String

Return Value

Type: void

Sets the URL of the workspace.

Signature

Parameters

url

Type: String

Return Value

Type: void

Signature

Parameters

user

Type: String

Return Value

Type: void

Signature

Parameters

userId

Type: String

Return Value

Type: void