Sample - Slack Web API
GET/users.list

List Slack team users

Lists all users in a Slack team. Use cursor to retrieve subsequent pages, limit to control the requested page size, and include_locale when you need each user's locale.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
tokenstringoptional
Authentication token with the `users:read` scope.
limitintegeroptional
Maximum number of users to request in the response. Slack may return fewer users, and omitting it requests the entire result set.
cursorstringoptional
Pagination cursor from a previous response's `response_metadata.next_cursor` value. Omit it to retrieve the first page.
include_localebooleanoptional
Set to true to include each user's locale. Defaults to false when omitted.

2 status codes
200Returns an object containing the users in `members`, the response cache timestamp in `cache_ts`, an `ok` value of true, and pagination metadata when applicable.
cache_tsintegerrequired
membersarray<array>required
okbooleanrequired
Allowed:true
response_metadataarrayoptional
defaultTypical error response
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:limit_requiredinvalid_cursornot_authedinvalid_authaccount_inactiveno_permissioninvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_typemissing_post_type
okbooleanrequired
Allowed:false

Error handling

token must carry the users:read scope. limit must be an integer when supplied, cursor must come from a previous next_cursor value, and include_locale must be a boolean.