slack.slack.listusers
Home > @runlightyear/slack > Slack > listUsers
Slack.listUsers() method
List users
Signature:listUsers(props?: ListUsersProps): Promise<ListUsersResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
props | ListUsersProps | (Optional1) |
Promise<ListUsersResponse>
Example
List users
import { defineAction } from "@runlightyear/lightyear";
import { Slack } from "@runlightyear/slack";
defineAction({
name: "listUsers",
title: "List Users",
apps: ["slack"],
run: async ({ auths }) => {
const slack = new Slack({
auth: auths.slack,
});
const response = await slack.listUsers();
console.log("Response data: ", response.data);
},
});