Identify the connected token: its user, bot, team and URL (auth.test).
1
import { WebClient } from "@slack/web-api"
2
3
/**
4
* Get Current User
5
* Identify the connected token (auth.test): `user_id`, `user`, `team_id`, `team`, workspace `url`, and `bot_id` when it is a bot token — handy to check which identity a resource acts as. No scope needed.
6
*/
7
export async function main(auth: RT.Slack) {
8
const client = new WebClient(auth.token)
9
return await client.auth.test()
10
}
11