signInAnonymously

abstract suspend fun signInAnonymously(data: JsonObject? = null, captchaToken: String? = null)(source)

Signs in the user without any credentials. This will create a new user session with a new access token.

If you want to upgrade this anonymous user to a real user, use linkIdentity to link an OAuth identity or updateUser to add an email or phone.

Parameters

data

Extra data for the user

captchaToken

The captcha token to use

Throws

RestException

or one of its subclasses if receiving an error response. If the error response contains a error code, an AuthRestException will be thrown which can be used to easier identify the problem.

HttpRequestTimeoutException

if the request timed out

HttpRequestException

on network related issues