login method. A single call to login creates the account if the userId does not exist, or authenticates the user if it does.
The
login method serves dual purposes: it creates new users when they don’t exist and authenticates existing users when they do.How user creation works
When you call thelogin method:
- Existing user: If a user exists with the specified
userId, the SDK logs them in and optionally updates theirdisplayName. - New user: If no user exists with the
userId, the SDK creates a new account and logs them in automatically.
Parameters
Log in or create a user
Call the platform login method with auserId; include displayName, authToken, and session renewal handling when your integration needs them.
Related topics
Get User Information
Learn how to retrieve user data and profiles.
Update User Information
Discover how to modify user profiles and settings.