Skip to content

Latest commit

 

History

History
133 lines (95 loc) · 1.81 KB

User.md

File metadata and controls

133 lines (95 loc) · 1.81 KB

Slack User API Methods (Go Back)

This PHP class provides methods to interact with the Slack User API. Below are instructions on how to use each method.

Method: list

list(
    ?string $cursor = null,
    bool $includeLocale = false,
    int $limit = 0,
    string $teamId = null
)

Retrieve a list of users in a team.

Method: conversations

conversations(
    ?string $cursor = null,
    bool $excludeArchived = false,
    int $limit = 100,
    string $teamId = null,
    array $channelTypes = ['public_channel', 'private_channel', 'mpim', 'im'],
    string $userId
)

Retrieve a list of conversations for a user.

Method: deletePhoto

deletePhoto()

Delete a user's profile photo.

Method: getPresence

getPresence(
    ?string $userId = null
)

Retrieve a user's presence information.

Method: identity

identity()

Retrieve a user's identity information.

Method: info

info(
    ?bool $includeLocale = null
)

Retrieve information about a user.

Method: lookupByEmail

lookupByEmail(
    string $email
)

Lookup a user by their email address.

Method: setActive

setActive()

Set a user's presence status as active.

Method: setPhoto

setPhoto(
    $image,
    ?string $cropW = null,
    ?string $cropX = null,
    ?string $cropY = null
)

Set a user's profile photo.

Method: setPresence

setPresence(
    $presence
)

Set a user's presence status.

Method: getProfile

getProfile(
    ?string $userId = null,
    ?bool $includeLabels = null
)

Retrieve a user's profile information.

Method: setProfile

setProfile(
    ?string $name = null,
    ?array $profile = null,
    ?string $userId = null,
    ?string $value = null
)

Set a user's profile information.