Authenticating users in the AI chat
Use JSON Web Tokens (JWTs) to securely authenticate your users and control access to functions of your chat that require authorization.
Authenticating with the sub
claim
When you create a JWT for the web chat, you must specify a value for the sub
(subject) claim, which identifies the user. For anonymous users, you can use a generated unique ID.
For AI chat, the following behavior applies:
-
When the integration receives a message signed with this JWT, it stores the user ID from the
sub
claim assystem_integrations.channel.private.user.id
in actions. -
It stores the user ID as
integrations.channel.private.user.id
in dialog.
Privacy concerns
If you are required to comply with GDPR requirements, you might need to persistently store any generated anonymous user IDs, especially for anonymous users who later log in with user credentials. Storing these user IDs makes it possible for you to later delete all data associated with an individual customer if requested to do so.
Parent topic: