Guest Users

Last Edit: Jun 06 2020

Guest sessions can be created client-side and do not require any server-side authentication.

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 setUser.

await client.setGuestUser({ id: 'tommaso' });

client.getGuestToken(userId, userName).enqueue(result -> {
    User user =;
    String token =;

    client.setUser(user, token, null);

    return Unit.INSTANCE;

let userExtraData = UserExtraData(name: "Bender", avatarURL: URL(string: "")!)
let user = User(id: "bender", extraData: userExtraData)
// Setup the current user and guest token.
Client.shared.setGuestUser(user: user)

val userId = "user-id"
val userName = "bender"
client.getGuestToken(userId, userName).enqueue {
    val token =
    val user =

    client.setUser(user, token)
The user object schema is the same as the one described in the Setting the user portion of the docs.