简体   繁体   中英

identifying a Skype user using the bot -c#

I'm building a Skype bot using Microsoft's framework and I want to recognize the users. can anyone give suggestions on how to do it? The users should be recognized in order to give them authorization for tasks the bot preforms so it must be something that never changes and can be stored on a database. The only thing I saw was "ServiceUrl".

thanks!

You can get the unique user id like below:

var userId = Context.Activity.From.Id;

This will always give you the user ID of the channel they reside on. In your case it will be their Skype ID.

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