Skip to content

Slack: Lists all users in a Slack team

Slack users.list: arguments, response, policy and SDK examples.

← Users operations · Get started

Operation slack.users_list

Provider route: GET /users.list. Alter supplies the connection’s credentials and routing.

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["users"]["list"]>[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.users.list(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.list(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.cursorstringOptional
query.include_localebooleanOptional
query.limitnumberOptional
query.team_idstringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootSchema for successful response from users.list method
cache_tsJSONOptional
cache_ts (anyOf 1)integerAlternative
cache_ts (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
membersarrayOptional
members[]ModelEach itemExpand Gets information about a user — response body — user
okbooleanRequired within parentMust equal: true
response_metadataModelOptionalExpand Gets information about a file — response body — response metadata

Referenced models: Gets information about a file — response body — response metadata, Gets information about a user — response body — user

2 more schemas are linked from the tables above, on the schema pages.

Gets information about a file — response body — response metadata
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).next_cursorstringOptional
$ (anyOf 2)objectAlternative
$ (anyOf 2).messagesarrayOptional
$ (anyOf 2).messages[]stringEach item
$ (anyOf 2).warningsarrayOptional
$ (anyOf 2).warnings[]stringEach itemKnown values: method_deprecated
$ (anyOf 3)objectAlternative
$ (anyOf 3).messagesarrayOptional
$ (anyOf 3).messages[]stringEach item
$ (anyOf 3).next_cursorstringOptional
$ (anyOf 3).warningsarrayOptional
$ (anyOf 3).warnings[]stringEach itemKnown values: method_deprecated
Gets information about a user — response body — user
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeuser object for non enterprise type
$ (anyOf 1).colorstringOptional
$ (anyOf 1).deletedbooleanOptional
$ (anyOf 1).enterprise_userModelOptionalExpand Gets information about a user — response body — user enterprise user enterprise user
$ (anyOf 1).has_2fabooleanOptional
$ (anyOf 1).idstringOptional
$ (anyOf 1).is_adminbooleanOptional
$ (anyOf 1).is_app_userbooleanOptional
$ (anyOf 1).is_botbooleanOptional
$ (anyOf 1).is_externalbooleanOptional
$ (anyOf 1).is_forgottenbooleanOptional
$ (anyOf 1).is_invited_userbooleanOptional
$ (anyOf 1).is_ownerbooleanOptional
$ (anyOf 1).is_primary_ownerbooleanOptional
$ (anyOf 1).is_restrictedbooleanOptional
$ (anyOf 1).is_strangerbooleanOptional
$ (anyOf 1).is_ultra_restrictedbooleanOptional
$ (anyOf 1).localestringOptional
$ (anyOf 1).namestringOptional
$ (anyOf 1).presencestringOptional
$ (anyOf 1).profileModelOptionalExpand Retrieve a user's profile information, including their custom status — response body — profile
$ (anyOf 1).real_namestringOptional
$ (anyOf 1).teamstringOptional
$ (anyOf 1).team_idstringOptional
$ (anyOf 1).team_profileobjectOptional
$ (anyOf 1).team_profile.fieldsarrayOptional
$ (anyOf 1).team_profile.fields[]ModelEach itemExpand Retrieve a team's profile — response body — profile fields item
$ (anyOf 1).two_factor_typestringOptional
$ (anyOf 1).tzJSONOptional
$ (anyOf 1).tz (anyOf 1)nullAlternative
$ (anyOf 1).tz (anyOf 2)stringAlternative
$ (anyOf 1).tz_labelstringOptional
$ (anyOf 1).tz_offsetJSONOptional
$ (anyOf 1).tz_offset (anyOf 1)numberAlternative
$ (anyOf 1).tz_offset (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).updatedJSONOptional
$ (anyOf 1).updated (anyOf 1)numberAlternative
$ (anyOf 1).updated (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2)objectAlternativeenterprise user
$ (anyOf 2).colorstringOptionalrefercing to bug: https://jira.tinyspeck.com/browse/EVALUE-1559
$ (anyOf 2).deletedbooleanOptional
$ (anyOf 2).enterprise_userModelOptionalExpand Gets information about a user — response body — user enterprise user enterprise user
$ (anyOf 2).has_2fabooleanOptional
$ (anyOf 2).idstringOptional
$ (anyOf 2).is_adminbooleanOptional
$ (anyOf 2).is_app_userbooleanOptional
$ (anyOf 2).is_botbooleanOptional
$ (anyOf 2).is_externalbooleanOptional
$ (anyOf 2).is_forgottenbooleanOptional
$ (anyOf 2).is_ownerbooleanOptional
$ (anyOf 2).is_primary_ownerbooleanOptional
$ (anyOf 2).is_restrictedbooleanOptional
$ (anyOf 2).is_strangerbooleanOptional
$ (anyOf 2).is_ultra_restrictedbooleanOptional
$ (anyOf 2).localestringOptional
$ (anyOf 2).namestringOptional
$ (anyOf 2).presencestringOptional
$ (anyOf 2).profileModelOptionalExpand Retrieve a user's profile information, including their custom status — response body — profile
$ (anyOf 2).real_namestringOptional
$ (anyOf 2).team_idstringOptional
$ (anyOf 2).team_profileobjectOptional
$ (anyOf 2).team_profile.fieldsarrayOptional
$ (anyOf 2).team_profile.fields[]ModelEach itemExpand Retrieve a team's profile — response body — profile fields item
$ (anyOf 2).teamsarrayOptional
$ (anyOf 2).teams[]stringEach item
$ (anyOf 2).two_factor_typestringOptional
$ (anyOf 2).tzJSONOptional
$ (anyOf 2).tz (anyOf 1)nullAlternative
$ (anyOf 2).tz (anyOf 2)stringAlternative
$ (anyOf 2).tz_labelstringOptional
$ (anyOf 2).tz_offsetJSONOptional
$ (anyOf 2).tz_offset (anyOf 1)numberAlternative
$ (anyOf 2).tz_offset (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2).updatedJSONOptional
$ (anyOf 2).updated (anyOf 1)numberAlternative
$ (anyOf 2).updated (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Gets information about a user — response body — user enterprise user enterprise user, Retrieve a team's profile — response body — profile fields item, Retrieve a user's profile information, including their custom status — response body — profile

Gets information about a user — response body — user enterprise user enterprise user
FieldTypePresenceDescription and constraints
$objectRoot
enterprise_idstringOptional
enterprise_namestringOptional
idstringOptional
is_adminbooleanOptional
is_ownerbooleanOptional
teamsarrayOptional
teams[]stringEach item
Retrieve a team's profile — response body — profile fields item
FieldTypePresenceDescription and constraints
$objectRoot
field_nameJSONOptional
field_name (anyOf 1)nullAlternative
field_name (anyOf 2)stringAlternative
hintstringOptional
idstringOptional
is_hiddenbooleanOptional
labelstringOptional
optionsJSONOptional
options (anyOf 1)nullAlternative
options (anyOf 2)ModelAlternativeExpand Retrieve a team's profile — response body — profile fields item options is custom, is multiple entry, is protected, is scim
orderingJSONOptional
ordering (anyOf 1)numberAlternative
ordering (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
possible_valuesJSONOptional
possible_values (anyOf 1)nullAlternative
possible_values (anyOf 1)[]stringEach item
possible_values (anyOf 2)arrayAlternative
possible_values (anyOf 2)[]stringEach item
typestringOptionalKnown values: text, date, link, mailto, options_list, user

Referenced models: Retrieve a team's profile — response body — profile fields item options is custom, is multiple entry, is protected, is scim

SDK function policy ID: slack.users_list. Catalog operation: users_list. 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:read"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.