Work with Users

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

Represents information about a Slack workspace user.

Usage

See Slack's user object type.

The following are methods for User.

Signature

Return Value

Type: String

Signature

Return Value

Type: Slack.User.EnterpriseUser

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Slack.User.Profile

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Integer

Signature

Return Value

Type: Long

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Parameters

admin

Type: Boolean

Return Value

Type: void

Signature

Parameters

appUser

Type: Boolean

Return Value

Type: void

Signature

Parameters

bot

Type: Boolean

Return Value

Type: void

Signature

Parameters

color

Type: String

Return Value

Type: void

Signature

Parameters

deleted

Type: Boolean

Return Value

Type: void

Signature

Parameters

emailConfirmed

Type: Boolean

Return Value

Type: void

Signature

Parameters

enterpriseUser

Type: Slack.User.EnterpriseUser

Return Value

Type: void

Signature

Parameters

has2fa

Type: Boolean

Return Value

Type: void

Signature

Parameters

hasFiles

Type: Boolean

Return Value

Type: void

Signature

Parameters

id

Type: String

Return Value

Type: void

Signature

Parameters

invitedUser

Type: Boolean

Return Value

Type: void

Signature

Parameters

locale

Type: String

Return Value

Type: void

Signature

Parameters

name

Type: String

Return Value

Type: void

Signature

Parameters

owner

Type:

Return Value

Type: void

Signature

Parameters

presence

Type: String

Return Value

Type: void

Signature

Parameters

primaryOwner

Type: Boolean

Return Value

Type: void

Signature

Parameters

profile

Type: Slack.User.Profile

Return Value

Type: void

Signature

Parameters

realName

Type: String

Return Value

Type: void

Signature

Parameters

restricted

Type: Boolean

Return Value

Type: void

Signature

Parameters

stranger

Type: Boolean

Return Value

Type: void

Signature

Parameters

teamId

Type: String

Return Value

Type: void

Signature

Parameters

twoFactorType

Type: String

Return Value

Type: void

Signature

Parameters

tz

Type: String

Return Value

Type: void

Signature

Parameters

tzLabel

Type: String

Return Value

Type: void

Signature

Parameters

tzOffset

Type: Integer

Return Value

Type: void

Signature

Parameters

ultraRestricted

Type: Boolean

Return Value

Type: void

Signature

Parameters

updated

Type: Long

Return Value

Type: void

Signature

Parameters

whoCanShareContactCard

Type: Boolean

Return Value

Type: void

Signature

Parameters

workflowBot

Type: Boolean

Return Value

Type: void

Represents an enterprise grid user.

Usage

See Slack's user object type.

The following are methods for User.EnterpriseUser.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: List<String>

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Parameters

isAdmin

Type: Boolean

Return Value

Type: void

Signature

Parameters

enterpriseId

Type: String

Return Value

Type: void

Signature

Parameters

enterpriseName

Type: String

Return Value

Type: void

Signature

Parameters

id

Type: String

Return Value

Type: void

Signature

Parameters

isOwner

Type: Boolean

Return Value

Type: void

Signature

Parameters

teams

Type: List<String>

Return Value

Type: void

The following are methods for User.Field.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Parameters

alt

Type: String

Return Value

Type: void

Signature

Parameters

label

Type: String

Return Value

Type: void

Signature

Parameters

value

Type: String

Return Value

Type: void

Represents the user's profile, including the user's title, real and display names, email, and avatar images.

Usage

See Slack's user object type.

The following are methods for User.Profile.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Map<String,Slack.User.Field>

Signature

Return Value

Type: String

Signature

Return Value

Type: Long

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Long

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Parameters

alwaysActive

Type: Boolean

Return Value

Type: void

Signature

Parameters

apiAppId

Type: String

Return Value

Type: void

Signature

Parameters

avatarHash

Type: String

Return Value

Type: void

Signature

Parameters

botId

Type: String

Return Value

Type: void

Signature

Parameters

customImage

Type: Boolean

Return Value

Type: void

Signature

Parameters

displayName

Type: String

Return Value

Type: void

Signature

Parameters

displayNameNormalized

Type: String

Return Value

Type: void

Signature

Parameters

email

Type: String

Return Value

Type: void

Signature

Parameters

fields

Type: Map<String,Slack.User.Field>

Return Value

Type: void

Signature

Parameters

guestChannels

Type: String

Return Value

Type: void

Signature

Parameters

guestExpirationTs

Type: Long

Return Value

Type: void

Signature

Parameters

guestInvitedBy

Type: String

Return Value

Type: void

Signature

Parameters

image24

Type: String

Return Value

Type: void

Signature

Parameters

image32

Type: String

Return Value

Type: void

Signature

Parameters

image48

Type: String

Return Value

Type: void

Signature

Parameters

image72

Type:

Return Value

Type: void

Signature

Parameters

image192

Type: String

Return Value

Type: void

Signature

Parameters

image512

Type: String

Return Value

Type: void

Signature

Parameters

image1024

Type: String

Return Value

Type: void

Signature

Parameters

imageOriginal

Type: String

Return Value

Type: void

Signature

Parameters

phone

Type: String

Return Value

Type: void

Signature

Parameters

pronouns

Type: String

Return Value

Type: void

Signature

Parameters

realName

Type: String

Return Value

Type: void

Signature

Parameters

realNameNormalized

Type: String

Return Value

Type: void

Signature

Parameters

skype

Type: String

Return Value

Type: void

Signature

Parameters

statusEmoji

Type: String

Return Value

Type: void

Signature

Parameters

statusEmojiDisplayInfo

Type: List<Slack.User.StatusEmojiDisplayInfo>

Return Value

Type: void

Signature

Parameters

statusEmojiUrl

Type: String

Return Value

Type: void

Signature

Parameters

statusExpiration

Type: Long

Return Value

Type: void

Signature

Parameters

statusText

Type: String

Return Value

Type: void

Signature

Parameters

statusTextCanonical

Type: String

Return Value

Type: void

Signature

Parameters

team

Type: String

Return Value

Type: void

Signature

Parameters

title

Type: String

Return Value

Type: void

Represents an enterprise grid user.

The following are methods for User.StatusEmojiDisplayInfo.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Parameters

emojiName

Type: String

Return Value

Type: void

Signature

Parameters

displayAlias

Type: String

Return Value

Type: void

Signature

Parameters

displayUrl

Type: String

Return Value

Type: void

Sends a request to list conversations the calling user may access.

Usage

See Slack's users.conversations method.

The following are methods for UsersConversationsRequest.

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

Signature

Return Value

Type: Slack.UsersConversationsRequest.Builder

Sends a request to list conversations the calling user may access.

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

Required. Returns an instance of Slack.UsersConversationsRequest.

Signature

Return Value

Type: Slack.UsersConversationsRequest

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.UsersConversationsRequest.Builder

Signature

Parameters

excludeArchived

Type: Boolean

Return Value

Type: Slack.UsersConversationsRequest.Builder

Signature

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.UsersConversationsRequest.Builder

Signature

Parameters

teamId

Type: String

Return Value

Type: Slack.UsersConversationsRequest.Builder

Signature

Parameters

types

Type: List<Slack.ConversationType>

Return Value

Type: Slack.UsersConversationsRequest.Builder

Signature

Parameters

user

Type: String

Return Value

Type: Slack.UsersConversationsRequest.Builder

List conversations the calling user may access.

Usage

See Slack's users.conversations method.

This class contains standard response methods.

The following are methods for UsersConversationsResponse.

Signature

Return Value

Type: List<Slack.Conversation>

Signature

Return Value

Type: Slack.ResponseMetadata

Signature

Parameters

channels

Type: List<Slack.Conversation>

Return Value

Type: void

Signature

Parameters

responseMetadata

Type: Slack.ResponseMetadata

Return Value

Type: void

Builds a request to delete the user profile photo.

The following are methods for UsersDeletePhotoRequest.Builder.

Required. Returns an instance of Slack.UsersDeletePhotoRequest.

Signature

Return Value

Type: Slack.UsersDeletePhotoRequest

Sends a request to delete the user profile photo.

Usage

See Slack's users.deletePhoto.

The following are methods for UsersDeletePhotoRequest.

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

Signature

Return Value

Type: Slack.UsersDeletePhotoRequest.Builder

Delete the user profile photo.

Usage

See Slack's users.deletePhoto.

This class contains standard response methods.

Builds a request to get user presence information.

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

Required. Returns an instance of Slack.UsersGetPresenceRequest.

Signature

Return Value

Type: Slack.UsersGetPresenceRequest

Signature

Parameters

user

Type: String

Return Value

Type: Slack.UsersGetPresenceRequest.Builder

Sends a request to get user presence information.

Usage

See Slack's users.getPresence method.

The following are methods for UsersGetPresenceRequest.

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

Signature

Return Value

Type: Slack.UsersGetPresenceRequest.Builder

Gets user presence information.

Usage

See Slack's users.getPresence method.

This class contains standard response methods.

The following are methods for UsersGetPresenceResponse.

Signature

Return Value

Type: Integer

Signature

Return Value

Type: Integer

Signature

Return Value

Type: String

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Return Value

Type: Boolean

Signature

Parameters

autoAway

Type: Boolean

Return Value

Type: void

Signature

Parameters

connectionCount

Type: Integer

Return Value

Type: void

Signature

Parameters

lastActivity

Type: Integer

Return Value

Type: void

Signature

Parameters

manualAway

Type: Boolean

Return Value

Type: void

Signature

Parameters

online

Type: Boolean

Return Value

Type: void

Signature

Parameters

presence

Type: String

Return Value

Type: void

Builds a request to get a user's identity.

The following are methods for UsersIdentityRequest.Builder.

Required. Returns an instance of the Slack.UsersIdentityRequest object.

Signature

Return Value

Type: Slack.UsersIdentityRequest

Sends a request to get a user's identity.

Usage

See Slack's users.identity method.

The following are methods for UsersIdentityRequest.

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

Signature

Return Value

Type: Slack.UsersIdentityRequest.Builder

Get a user's identity.

The following are methods for UsersIdentityResponse.Team.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Parameters

id

Type: String

Return Value

Type: void

Signature

Parameters

name

Type: String

Return Value

Type: void

Get a user's identity.

The following are methods for UsersIdentityResponse.User.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Parameters

email

Type: String

Return Value

Type: void

Signature

Parameters

id

Type: String

Return Value

Type: void

Signature

Parameters

image24

Type: String

Return Value

Type: void

Signature

Parameters

image32

Type: String

Return Value

Type: void

Signature

Parameters

image48

Type: String

Return Value

Type: void

Signature

Parameters

image72

Type: String

Return Value

Type: void

Signature

Parameters

image192

Type: String

Return Value

Type: void

Signature

Parameters

image512

Type: String

Return Value

Type: void

Signature

Parameters

name

Type: String

Return Value

Type: void

Gets a user's identity.

Usage

See Slack's users.identity method.

This class contains standard response methods.

The following are methods for UsersIdentityResponse.

Signature

Return Value

Type: Slack.UsersIdentityResponse.Team

Signature

Return Value

Type: Slack.UsersIdentityResponse.User

Signature

Parameters

team

Type: Slack.UsersIdentityResponse.Team

Return Value

Type: void

Signature

Parameters

user

Type: Slack.UsersIdentityResponse.User

Return Value

Type: void

Sends a request to get information about a user.

Usage

See Slack's users.info method.

The following are methods for UsersInfoRequest.

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

Signature

Return Value Type: Slack.UsersInfoRequest.Builder

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

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

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

Required. Returns an instance of Slack.UsersInfoRequest.

Signature

Return Value

Type: Slack.UsersInfoRequest

Signature

Parameters

includeLocale

Type: Boolean

Return Value

Type.UsersInfoRequest.Builder

Required. The user to get info on.

Signature

Parameters

user

Type: String

Return Value

Type: Slack.UsersInfoRequest.Builder

Gets information about a user.

Usage

See Slack's users.info method.

This class contains standard response methods.

The following are methods for UsersInfoResponse.

Signature

Return Value

Type: Slack.User

Signature

Parameters

user

Type: Slack.User

Return Value

Type: void

Sends a request to lists all users in a Slack team.

Usage

See Slack's users.list method.

The following are methods for UsersListRequest.

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

Signature

Return Value

Type: Slack.UsersListRequest.Builder

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

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

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

Required. Returns an instance of Slack.UsersListRequest.

Signature

Return Value Type: Slack.UsersListRequest

Signature

Parameters

cursor

Type: String

Return Value

Type: Slack.UsersListRequest.Builder

Signature

Parameters

includeLocale

Type: Boolean

Return Value

Type: Slack.UsersListRequest.Builder

Signature

Parameters

limitValue

Type: Integer

Return Value

Type: Slack.UsersListRequest.Builder

Signature

Parameters

teamId

Type: String

Return Value

Type: Slack.UsersListRequest.Builder

Lists all users in a Slack team.

Usage

See Slack's users.list method.

This class contains standard response methods.

The following are methods for UsersListResponse.

Signature

Return Value

Type: String

Signature

Return Value

Type: List<Slack.User>

Signature

Return Value

Type: String

Signature

Return Value

Type: Slack.ResponseMetadata

Signature

Parameters

cacheTs

Type: String

Return Value

Type: void

Signature

Parameters

members

Type: List<Slack.User>

Return Value

Type: void

Signature

Parameters

offset

Type: String

Return Value

Type: void

Sends a request to find a user with an email address.

Usage

See Slack's users.lookupByEmail method.

The following are methods for UsersLookupByEmailRequest.

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

Signature

Return Value

Type: Slack.UsersLookupByEmailRequest.Builder

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

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

The following are methods for UsersLookupByEmailRequest.Builder.

Required. Returns an instance of Slack.UsersLookupByEmailRequest.

Signature

Return Value

Type: Slack.UsersLookupByEmailRequest

Required. An email address belonging to a user in the workspace.

Signature

Parameters

email

Type: String

Return Value

Type: Slack.UsersLookupByEmailRequest.Builder

Find a user with an email address.

Usage

See Slack's users.lookupByEmail method.

This class contains standard response methods.

The following are methods for UsersLookupByEmailResponse.

Signature

Return Value

Type: Slack.User

Signature

Parameters

user

Type: Slack.User

Return Value

Type: void

Sends a request to retrieve a user's profile information, including their custom status.

Usage

See Slack's users.profile.get method.

The following are methods for UsersProfileGetRequest.

Signature

Return Value

Type: Slack.UsersProfileGetRequest.Builder

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

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

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

Required. Returns an instance of Slack.UsersProfileGetRequest.

Signature

Return Value

Type: Slack.UsersProfileGetRequest

Signature

Parameters

includeLabels

Type: Boolean

Return Value

Type: Slack.UsersProfileGetRequest.Builder

Signature

Parameters

user

Type: String

Return Value

Type: Slack.UsersProfileGetRequest.Builder

Retrieve a user's profile information, including their custom status.

Usage

See Slack's users.profile.get method.

This class contains standard response methods.

Sends a request to set a user's profile information, including custom status.

Usage

See Slack's users.profile.set method.

The following are methods for UsersProfileSetRequest.

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

Signature

Return Value

Type: Slack.UsersProfileSetRequest.Builder

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

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

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

Required. Returns an instance of `Slack.UsersProfileSetRequest.

Signature

Signature

Parameters

name

Type: String

Return Value

Type: Slack.UsersProfileSetRequest.Builder

Signature

Parameters

user

Type: String

Return Value

Type: Slack.UsersProfileSetRequest.Builder

Signature

Parameters

value

Type: String

Return Value

Type: Slack.UsersProfileSetRequest.Builder

Set a user's profile information, including custom status.

Usage

See Slack's users.profile.set method.

This class contains standard response methods.

The following are methods for UsersProfileSetResponse.

Signature

Return Value Type: String

Sent a request to mark a user as active. Deprecated and non-functional.

Usage

See Slack's users.setActive method.

The following are methods for UsersSetActiveRequest.

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

Signature

Return Value

Type: Slack.UsersSetActiveRequest.Builder

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

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

The following are methods for UsersSetActiveRequest.Builder.

Required. Returns an instance of Slack.UsersSetActiveRequest.

Signature

Return Value

Type: Slack.UsersSetActiveRequest

Marked a user as active.

Usage

See Slack's users.setActive method.

This class contains standard response methods.

Sends a request to manually sets user presence.

Usage

See Slack's users.setPresence method.

The following are methods for UsersSetPresenceRequest.

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

Signature

Return Value

Type: Slack.UsersSetPresenceRequest.Builder

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

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

The following are methods for UsersSetPresenceRequest.Builder.

Required. Returns an instance of Slack.UsersSetPresenceRequest.

Signature

Return Value

Type: Slack.UsersSetPresenceRequest

Required. Either auto or away.

Signature

Parameters

presence

Type: String

Return Value

Type: Slack.UsersSetPresenceRequest.Builder

Manually sets user presence.

Usage

See Slack's users.setPresence method.

This class contains standard response methods.