Bot Framework User Identification

主宰稳场 提交于 2019-12-01 13:32:17

问题


How does bot framework identify the user so it knows to go and grab correct state data? It identifies user correctly when same channel is used, even on different machines. Does it user IP address or something similar?


回答1:


It is based on the Id property of the user + the channel Id. This user Id depends on the channel: each channel has a specific format of user Id, hence those 2 fields.

Examples:

  • Webchat: by default is userid but can be changed: user: { id: 'userid' },
  • Emulator: user ID is always set to default-user
  • Facebook Messenger: the user ID is a PSID (Page Scoped ID) of the user
  • Slack: the user ID is made of the concatenation of several parameters: Slack's Team ID, Slack's channel ID, and Slack's User ID
  • SMS: it's the phone number
  • Email: it's the email address
  • etc


来源:https://stackoverflow.com/questions/49542022/bot-framework-user-identification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!