Authless Users
Confused about "Authless Users"?
Let us know how we can improve our documentation:
- On This Page:
- Guest Users
- Anonymous Users
Stream Chat also lets you give unauthenticated users with access to a limited subset of Stream's capabilities. This is done by using either Guest or Anonymous users.
These two user types are ideal for use cases where users either need to be able to see chat activity prior to authenticating or in scenarios where the additional friction of creating a user account might be unnecessary for a user.
Guest Users
Copied!Confused about "Guest Users"?
Let us know how we can improve our documentation:
Guest sessions can be created client-side and do not require any server-side authentication. Support and livestreams are common use cases for guests users because really often you want a visitor to be able to use chat on your application without (or before) they have a regular user account.
Guest users are not available to application using multi-tenancy (teams).
Guest users have a limited set of permissions. You can read more about how to configure permissions here. You can create a guest user session by using setGuestUser
instead of connectUser
.
You can generate a guest user in a front end client by using the following code:
Anonymous Users
Copied!Confused about "Anonymous Users"?
Let us know how we can improve our documentation:
If a user is not logged in, you can call the connectAnonymousUser
method. While you’re anonymous, you can’t do much by default, but for the livestream channel type, you’re still allowed to read the chat conversation.
When you connect to chat using anonymously you receive a special user back with the following data: