Avatar Creator
Integrate the Avatar Creator via iframe or WebView.
The Avatar Creator can be integrated into your app via iframe or WebView. The communication between your app or game and the Avatar Creator is by postMessage.
Emitted Events
All messages emitted by the iframe contain an eventName
and source
which can be used for filtering the emitted output. See the table below for all currently supported events and their sample outputs.
v1.frame.ready
v1.subscription.created
v1.subscription.deleted
v1.avatar.exported
v1.user.set
v1.user.updated
v1.user.logout
v1.user.authorized
Queries
Supported messages that can be posted to the iframe after the v1.frame.ready
event has been emitted.
Logout the user
Avatar Creator configuration
You can configure the features of the Avatar Creator by providing a query string to the URL.
See all avatar creator options ->
The available parameters, their values if necessary, and their effects are described in the following table.
frameApi
Enables subscribing to postMessage
events provided by the iframe. See more about messaging below.
clearCache
Disables caching avatar customization and restarts the app upon refreshing the iframe or when creating a new instance.
id
If an "id" query parameter is specified, Avatar Creator loads the corresponding avatar. For registered and guest users, not providing an "id" parameter will redirect them to the "Choose avatar" page. Anonymous users will have the last used avatar loaded in the editor automatically if they don't specify an "id" parameter.
https://yourappname.readyplayer.me/avatar?frameApi
https://yourappname.readyplayer.me/avatar?clearCache
Default Language
The Avatar Creator automatically picks the system/browser language of the user's device. To set a different default language, do one of the following.
This is not available from Studio. You need to modify the URL of the Avatar Creator.
To change the language, include the language code in the URL path.
Example URL for setting German as the default language.
Supported languages and their language codes
English
en
English (Ireland)
en-IE
German
de
French
fr
Spanish
es
Spanish (Mexican)
es-MX
Portuguese
pt
Portuguese (Brazil)
pt-BR
Italian
it
Turkish
tr
Japanese
jp
Korean
kr
Chinese
ch
Clear Cache
By default, the Avatar Creator uses local browser storage to store and restore a user's session, such as their login state and current avatar creation step.
If you want to disable this behavior, for example, if multiple users are using the same device, use the ClearCache
parameter.
Open the Avatar Creator with the query string ?clearCache
User Session restoration, account linking, and Token Parameter
To restore user sessions, you can still utilize the "token" parameter. For detailed information on how to use this parameter, please refer to our documentation at Login on Behalf of a User and Request a Token. Post Message API and Event Consistency Avatar Creator maintains consistency with the previous version regarding emitted events, as outlined in our public documentation. The Post Message API, used for communication and interaction with the editor, continues to function seamlessly, ensuring that existing integrations and workflows remain unchanged. This means that the events you've come to rely on for real-time updates and interactions with the editor will still be available, allowing for a smoother transition to Avatar Creator. We encourage you to refer to our documentation for detailed information on utilizing the Post Message API to enhance your integration with the editor.
Last updated