Account Linking
Link Ready Player Me accounts to your user profiles.
Last updated
Link Ready Player Me accounts to your user profiles.
Last updated
Account Linking allows end-users to link their Ready Player Me account to your app/game account, so they won't have to log in again when they return to your app. This is particularly useful for cross-device experiences when session information is lost.
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 account linking 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.
Users with a Ready Player Me account can authorize your application to create/modify avatars by entering their credentials in the Avatar Creator. They do that by clicking the sign-in with Ready Player Me button within the iFrame.
Once the user authorizes, you will be returned it’s User-ID from the iFrame. Therefore you need to subscribe to the postMessage event v1.user.authorized
from the iFrame
Read more on postMessage events
You will need the User ID to login on behalf of your user with an API request. (See next chapter)
After getting authorized by the end-user and having his/her userId, you can request an access token for this user, which you can use to open the Avatar Creator in the iFrame or WebView.
Get Token
GET
https://api.readyplayer.me/v1/auth/token
Get a shortlived token (15s) to authenticate the WebView/iFrame
userId*
String
UserID of your user
partner*
String
Your subdomain
x-api-key*
String
Your API Key
Add the token from the to the main ReadyPlayerMe URL you use in the iframe or WebView.
The user should be logged in and have access to his/her avatars within the iFrame.
The token lives for 15 seconds, so you must request it right before using it.