Remarks
Apps need to refresh the user’s login status upon each launch, which is done by the Account Login API. There are two account login states: signed in, and signed out. By keeping the login status up-to-date, apps make sure that users have access to appropriate content and features. The interface allows apps to communicate a boolean value indicating whether a user is logged in, both at launch and whenever the login state changes. The system can also query this status as needed, enabling a personalized user experience. Products can leverage this information to feature or filter content from services where the user is already authenticated, allowing for instant access to content. The Account Login functionality offers two key components for managing authentication status: the updateStatus method, and thehandleReadStatus callback function. The updateStatus method reports an app’s current login status for real-time updates when the authentication state changes. The handleReadStatus callback function can respond to system queries about the app’s current login status. Both methods use the StatusType for account status, with two possible values: SIGNED_IN and SIGNED_OUT.
Get started
Setup
- Add the following library dependency to the
dependenciessection of your package.json file.
-
In your manifest.toml, add the following privileges required to access.
Note: When modifying the manifest entries, replace
com.amazondeveloper.media.samplewith your app’s package ID, as seen in the following example.
- Content Launcher Cluster API for finding and launching content
- Vega Media Controls API for controlling launched media
- Account Login API for communicating Account Login status to the system
override_attribute_component setting, as demonstrated in this TOML example and in the previous example:
Related topics
Account Login Integration GuideAPI Reference
Classes
- AccountLoginServerComponent — Provides factory methods for creating
IAccountLoginServerAsyncinstance. - InternalError — Error class for internal errors, such as setup failures.
- InvalidArgumentError — Error class for invalid argument exception.
Interfaces
- IAccountLoginHandlerAsync — Interface for handling
AccountLogincallbacks asynchronously. - IAccountLoginServerAsync — Interface for the asynchronous AccountLoginServer.
- IStatus — Interface representing the login status.
- IStatusBuilder — Interface for building Status objects.
- KeplerScriptAccountLogin — Facilitates updating an application’s login status.
Enumerations
- StatusType — Enumeration representing possible login status types.

