Guest Accounts
You can create a Ready Player Me Guest Account for every user on your end. That is helpful when you want to store the state of the avatars and assets for your users without them having a Ready Player Me account. This also reduces friction in the user experience.
Prerequisites
Get your application id
For the request, you need an
application id
. Therefore, you must be signed up in Studio (https://studio.readyplayer.me) and click on the application. You will find the app-id in the header of the application page.Server Component The endpoints should be called from a server to keep your API Key secure. So we recommend you set up a server component and have all guest-account creation logic connected to your user management in the backend.
Get your API Key This can be found within Ready Player Me Studio on the left hand navigation panel or directly here. You will need the API Key for all API-Requests. See authorizing requests.
Create a guest account
With an API call, you can create a guest account. You will be returned a user-id for an account that has already authorized your application to create/modify avatars.
POST Request to create a user
Create a guest account
POST
https://api.readyplayer.me/v1/users
Headers
x-api-key*
String
Your API key
Request Body
data.applicationId*
String
Your application id
With that User ID from the response, you can then request the token for the iFrame as explained in Account Linking. You can get your app id and create an API Key in Studio.
Transfer avatars and assets to an existing Ready Player Me Account
For users with a guest account, it is also possible to sign in with their existing Ready Player Me account. They will be asked to transfer their avatars and assets from the guest account to their Ready Player Me account.
After clicking on the Sign-In button, the user will be prompted with this message.
The iFrame also emits the v1.events.authorized
event with the new User-ID. You need to replace the User-ID (from your Guest-Account) with the new User-ID (from the regular Ready Player Me Account).
Please note that the guest account is being marked for deletion after merging, and you will be returned a new user-id.
Last updated