MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getSlackUser

Function getSlackUser

apps/web/services/slack/api/fetch_all_conversations.ts:237–249  ·  view source on GitHub ↗
(
  userId: string,
  token: string
)

Source from the content-addressed store, hash-verified

235};
236
237export const getSlackUser = async (
238 userId: string,
239 token: string
240): Promise<UserInfo> => {
241 const url = 'https://slack.com/api/users.info?';
242
243 const response = await request
244 .get(url + 'user=' + userId)
245 .set('Authorization', 'Bearer ' + token);
246
247 const responseBody = response.body as UserInfoResponseBody;
248 return responseBody.user;
249};
250
251export const getSlackBot = async (
252 botId: string,

Callers 1

Calls 2

setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected