slack
List Slack workspace members
Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as participantId to POST /v1/inbox/conversations.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
accountIdstring
Query Parameters
query?string
Case-insensitive filter over display name and handle.
Length
length <= 100limit?integer
Default
50Range
1 <= value <= 2000Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.slack.listSlackMembers({ path: { accountId: 'account_abc123', },});console.log(data);{
"members": [
{
"id": "U01ABCDEF",
"name": "Maria García",
"username": "maria",
"picture": "https://avatars.slack-edge.com/maria.png"
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Empty