On this page
Application users can generate user API keys with the SDK. You can allow devices or services to communicate with Realm on behalf of a user by associating a unique user API key with each device or service.
User API keys are always associated with a user object created by another non-anonymous authentication provider. Each user can associate up to 20 user keys with their account.
To create a new user API key, call the create() or createAsync() methods of a logged in user's apiKeyAuth instance. The user API key will be associated with the logged in user and can be used to interact with Realm on their behalf. You cannot create user API keys for anonymous users.
Store the API Key Value
The SDK only returns the value of the user API key when you create it. Make
sure to store the
key value securely so that you can use it to log in.
If you lose or do not store the
key value there is no way to recover it.
You will need to create a new user API key.