Skip to main content

slack.slack.listusers

Home > @runlightyear/slack > Slack > listUsers

Slack.listUsers() method

List users

Signature:
listUsers(props?: ListUsersProps): Promise<ListUsersResponse>;

Parameters

ParameterTypeDescription
propsListUsersProps(Optional1)
Returns:

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);
},
});