Slack: Retrieve a user's profile information, including their custom status
Slack usersProfile.get: arguments, response, policy and SDK examples.
← Users profile operations · Get started
Operation slack.users_profile_get
Provider route: GET /users.profile.get. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/slack with npm, or alter-sdk-slack with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SlackIntegration } from "@alter-ai/slack";
async function execute(input: Parameters<SlackIntegration["usersProfile"]["get"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SlackIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.usersProfile.get(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_slack import SlackIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SlackIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.users_profile.get(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.include_labels | boolean | Optional | |
query.user | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Schema for successful response from users.profile.get method |
ok | boolean | Required within parent | Must equal: true |
profile | Model | Optional | Expand Retrieve a user’s profile information, including their custom status — response body — profile |
Referenced models: Retrieve a user’s profile information, including their custom status — response body — profile
Schemas
Section titled “Schemas”Retrieve a user's profile information, including their custom status — response body — profile
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
always_active | boolean | Optional | |
api_app_id | string | Optional | |
avatar_hash | string | Optional | |
bot_id | string | Optional | |
display_name | string | Optional | |
display_name_normalized | string | Optional | |
email | JSON | Optional | |
email (anyOf 1) | null | Alternative | Format: email |
email (anyOf 2) | string | Alternative | Format: email |
fields | JSON | Optional | |
fields (anyOf 1) | object | Alternative | |
fields (anyOf 1)[] | object | Each item | |
fields (anyOf 2) | null | Alternative | |
fields (anyOf 2)[] | object | Each item | |
fields (anyOf 3) | array | Alternative | |
fields (anyOf 3)[] | object | Each item | |
first_name | JSON | Optional | |
first_name (anyOf 1) | null | Alternative | |
first_name (anyOf 2) | string | Alternative | |
guest_expiration_ts | JSON | Optional | |
guest_expiration_ts (anyOf 1) | null | Alternative | |
guest_expiration_ts (anyOf 2) | JSON | Alternative | |
guest_expiration_ts (anyOf 2) (anyOf 1) | integer | Alternative | |
guest_expiration_ts (anyOf 2) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
guest_invited_by | JSON | Optional | |
guest_invited_by (anyOf 1) | null | Alternative | |
guest_invited_by (anyOf 2) | string | Alternative | |
image_1024 | JSON | Optional | |
image_1024 (anyOf 1) | null | Alternative | Format: uri |
image_1024 (anyOf 2) | string | Alternative | Format: uri |
image_192 | JSON | Optional | |
image_192 (anyOf 1) | null | Alternative | Format: uri |
image_192 (anyOf 2) | string | Alternative | Format: uri |
image_24 | JSON | Optional | |
image_24 (anyOf 1) | null | Alternative | Format: uri |
image_24 (anyOf 2) | string | Alternative | Format: uri |
image_32 | JSON | Optional | |
image_32 (anyOf 1) | null | Alternative | Format: uri |
image_32 (anyOf 2) | string | Alternative | Format: uri |
image_48 | JSON | Optional | |
image_48 (anyOf 1) | null | Alternative | Format: uri |
image_48 (anyOf 2) | string | Alternative | Format: uri |
image_512 | JSON | Optional | |
image_512 (anyOf 1) | null | Alternative | Format: uri |
image_512 (anyOf 2) | string | Alternative | Format: uri |
image_72 | JSON | Optional | |
image_72 (anyOf 1) | null | Alternative | Format: uri |
image_72 (anyOf 2) | string | Alternative | Format: uri |
image_original | JSON | Optional | |
image_original (anyOf 1) | null | Alternative | Format: uri |
image_original (anyOf 2) | string | Alternative | Format: uri |
is_app_user | boolean | Optional | |
is_custom_image | boolean | Optional | |
is_restricted | JSON | Optional | |
is_restricted (anyOf 1) | null | Alternative | |
is_restricted (anyOf 2) | boolean | Alternative | |
is_ultra_restricted | JSON | Optional | |
is_ultra_restricted (anyOf 1) | null | Alternative | |
is_ultra_restricted (anyOf 2) | boolean | Alternative | |
last_avatar_image_hash | string | Optional | |
last_name | JSON | Optional | |
last_name (anyOf 1) | null | Alternative | |
last_name (anyOf 2) | string | Alternative | |
memberships_count | JSON | Optional | |
memberships_count (anyOf 1) | integer | Alternative | |
memberships_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | JSON | Optional | |
name (anyOf 1) | null | Alternative | |
name (anyOf 2) | string | Alternative | |
phone | string | Optional | |
pronouns | string | Optional | |
real_name | string | Optional | |
real_name_normalized | string | Optional | |
skype | string | Optional | |
status_default_emoji | string | Optional | |
status_default_text | string | Optional | |
status_default_text_canonical | JSON | Optional | |
status_default_text_canonical (anyOf 1) | null | Alternative | |
status_default_text_canonical (anyOf 2) | string | Alternative | |
status_emoji | string | Optional | |
status_expiration | JSON | Optional | |
status_expiration (anyOf 1) | integer | Alternative | |
status_expiration (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
status_text | string | Optional | |
status_text_canonical | JSON | Optional | |
status_text_canonical (anyOf 1) | null | Alternative | |
status_text_canonical (anyOf 2) | string | Alternative | |
team | string | Optional | |
title | string | Optional | |
updated | JSON | Optional | |
updated (anyOf 1) | integer | Alternative | |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
user_id | string | Optional | |
username | JSON | Optional | |
username (anyOf 1) | null | Alternative | |
username (anyOf 2) | string | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: slack.users_profile_get. Catalog operation: users_profile_get. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["users.profile:read"]