createAnonymousSession¶
Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its email and password or create an OAuth2 session.
Usage Example¶
extends Node
func _ready():
# You can skip setup if you have .env
Appwrite.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
Appwrite.set_project('<YOUR_PROJECT_ID>') # Your project ID
Appwrite.set_session('') # The user session to authenticate with
var result = await Appwrite.account.create_anonymous_session(
)
if result is AppwriteException:
push_error(result.message)
if result is AppwriteSession:
print(result.to_dict())