简体   繁体   中英

Get Slack userId in AWS lex Lambda function

I have integrated my AWS Lex bot in slack. I want to get the userId from slack

userId = intent_request['userId']

Here the userID comes in {channelID}:{SlackTeamID}:{SlackUserID} format.

How to get the SlackUserID from this.

If you look at the session id which lex post to lambda will have session id. It contains the slack user id information. You can take that info and query Slack API to get user info. Hope this help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM