SlackWebAPI v1.2.0 SlackWebAPI.Api.UsersProfile View Source

API calls for all endpoints tagged UsersProfile.

Link to this section Summary

Functions

Retrieves a user's profile information.

Set the profile information for a user.

Link to this section Functions

Link to this function

users_profile_get(connection, opts \\ [])

View Source
users_profile_get(Tesla.Env.client(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Retrieves a user's profile information.

Parameters

  • connection (SlackWebAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :token (String.t): Authentication token. Requires scope: users.profile:read
    • :include_labels (boolean()): Include labels for each ID in custom profile fields
    • :user (String.t): User to retrieve profile info for

Returns

{:ok, %{}} on success {:error, info} on failure

Link to this function

users_profile_set(connection, opts \\ [])

View Source
users_profile_set(Tesla.Env.client(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Set the profile information for a user.

Parameters

  • connection (SlackWebAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :token (String.t): Authentication token. Requires scope: users.profile:write
    • :profile (String.t): Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
    • :user (String.t): ID of user to change. This argument may only be specified by team admins on paid teams.
    • :value (String.t): Value to set a single key to. Usable only if profile is not passed.
    • :name (String.t): Name of a single key to set. Usable only if profile is not passed.

Returns

{:ok, %{}} on success {:error, info} on failure