LogoLogo
WebsiteBlogForumsSign up
  • Welcome
  • How Ready Player Me works
  • FAQ
  • 👩‍💻Integration Guides
    • Overview
    • Unity
      • Quickstart
      • Avatar Creator Integration
        • WebView Avatar Creator
          • Avatar Creator for Android & iOS
          • Avatar Creator for WebGL
        • Build your own Avatar Creator
          • Start with the sample
          • Elements
            • Asset Selection Element
            • Color Selection Element
            • Template Selection Element
            • Body Shapes Selection Element
            • Gender Selection Element
            • Avatar List Element
            • Photo Capture Element
            • Signup Element
            • Login Element
            • Logout Element
          • User Management
      • Load 2D Renders
      • Avatar Loader Window
      • Setup Multiplayer
      • Setup for XR (Beta)
        • Setup the Player Avatar
        • Setup Meta Movement SDK
        • Setup Final IK
        • Setup XR Hands
          • RpmHandDriver script
        • Facial Animations
        • VR Avatar Creator
      • Animations
        • Ready Player Me Animation Library
        • Mixamo Animations
      • Optimize
        • Avatar Configuration
        • Avatar Caching
        • Defer Agents
      • Code Samples
        • Loading 3D Avatars
        • Loading 2D Avatars
        • Avatar Creator (WebGL)
        • Avatar Creator (Desktop)
        • Avatar Creator (Mobile)
        • Distance-based LODs
      • Troubleshooting
        • Editor UI Window Issues
        • Avatar loading issues
        • iOS issues
        • WebGL issues
        • Firewall issues
        • Updating the SDK
          • Unity SDK 3.0.0 Migration guide
          • Unity SDK 4.0.0 Migration guide
          • Unity SDK 5.0.0
          • Unity SDK 7.0.0
          • WebView 2.0 Migration
        • Package installation issues
      • Help us improve the Unity SDK
      • FAQ for Unity
      • Early Access Features
    • Unreal Engine
      • Quickstart
        • Import SDK Manually
      • Avatar Creator Integration
        • Build your own Avatar Creator
          • Sample Structure
          • Customization Guide
        • WebView Avatar Creator
      • Load Avatars
      • Animations
        • Ready Player Me Animation Library
        • Loading Mixamo animations
        • Mannequin animation retargeting
        • Blender FBX export to UE
        • Oculus Lipsync integration
      • Optimize
        • Avatar configuration
        • Avatar caching
        • Avatar preloading
      • Code Samples
        • Unreal Engine 5 samples
        • Lyra project integration example
        • VR Avatars
        • Unreal Engine 4
      • Troubleshooting
        • Project compilation issues
        • Missing materials on built applications
        • Avatar loading issues
        • Animation issues
        • Unreal SDK breaking changes
        • Avatar lighting issues
        • Updating from earlier versions
          • Unreal SDK 3.0.0 Migration guide
        • Auto LOD issues
      • Help us improve the Unreal Engine SDK
      • FAQ for Unreal Engine
      • Early Access Features
    • React
      • Quickstart
    • React Native
    • iOS Native
    • Android Native
    • Web Integration
      • Quickstart
      • User Management
        • Guest Accounts
        • Account Linking
      • Avatar Creator integration
      • Optimize
    • API Integration
      • Quickstart
      • Custom Avatar Creator
      • User management
        • Ready Player Me Account
        • Anonymous Accounts
    • UX/UI Guidelines
      • Summary & quick tips
      • UX and UI guidelines and essentials
        • Foundation for good user experience
          • Layout
          • Colors
          • Typography
          • Icons
          • Dark mode and light mode
        • Mobile best practices
          • Layout
        • Making Ready Player Me feel native
          • Seamless Avatar Integration
          • Consistent Branding
          • Responsive Layout
          • Performance Optimization
        • Discoverability of the avatar editor
          • Onboarding tutorial
          • Clear navigation
          • Contextual Placement
  • 🖌️Customizing Guides
    • Studio (Developer Dashboard)
    • Avatar Creator Appearance
      • Avatar URLs
      • Avatar Shortcodes
    • Upload and Manage Custom Assets
      • Asset Manager in Studio
      • Configure in Studio
      • Manage custom assets using the API
      • Unlocking assets through API (Beta)
    • Create Custom Assets
      • Fullbody Outfits
        • Checking Skin Weights
      • Tops, Bottoms, Shoes
        • Editing templates
      • Hairstyle
      • Headwear
      • Facewear
      • Glasses
      • Hero Characters
      • Modeling Guidelines
  • 🔃API Reference
    • REST API
      • Authentication
      • Avatars
        • GET - 3D avatar
        • GET - 2D Render of an Avatar
        • GET - Metadata
        • PUT - Equip an asset
        • PUT - Unequip an asset
      • Assets
        • Asset Entity Properties
        • POST - Create Asset
        • GET - List Assets
        • PATCH - Update Asset
        • POST - Upload Asset Files
        • POST - Add Asset to Application
        • DELETE - Remove Asset from Application
        • PUT - Unlock asset for a user
        • PUT - Lock asset for a user
      • Users
        • POST - Create User
      • Auth
        • GET - Token
      • Changelog
    • Avatars
      • Full-body avatars
      • Full-body XR avatars
      • Half-body avatars
      • Morph targets
        • Apple ARKit
        • Oculus OVR LipSync
    • Avatar Creator
  • 🔉Support
    • Forums
    • Licensing & Privacy
Powered by GitBook
On this page
  • Before you begin
  • Main Goals:
  • 1. Authorize and create an anonymous user
  • Create anonymous user
  • 2. Create a default avatar for the user
  • 2.1 Fetch all possible templates
  • Get all templates
  • 2.2 Create a draft avatar from a template
  • Assign a specific template to the user
  • 2.3 Fetch draft avatar
  • Fetch the assigned avatar as a GLB file
  • 2.4 Save draft avatar
  • Save updated avatar
  • 3. Fetch avatar
  • Return avatar in glb format
  • 4. Customize your avatar

Was this helpful?

  1. Integration Guides
  2. API Integration

Quickstart

This step-by-step guide is designed to assist game developers in setting up player accounts and generating avatars through API integration.

PreviousAPI IntegrationNextCustom Avatar Creator

Last updated 5 months ago

Was this helpful?

Before you begin

  • You will need to know your application subdomain. This is accessible from the on your application page. If you don't have an account in the studio, then you will need to sign up.

Main Goals:

  • Account creation: Enable users to effortlessly create their accounts within your application.

  • Apply an existing template to the user: Facilitate users in customizing their avatars by applying pre-existing templates to their avatars for quick personalization.

  • Get user model: Fetch the created model into your application

1. Authorize and create an anonymous user

In this guide, we'll walk you through the process of creating an anonymous user and obtaining the access token required to access the API endpoints. The following endpoint will create a new user and it returns the access token to use for the creation of an avatar.

Create anonymous user

POST https://api.readyplayer.me/v1/users

Request Body

Name
Type
Description

data.applicationId*

string

The id of the application you wish to link the user to.

{
    "data": {
        "visitedAt": "2023-10-22T15:42:58.190Z",
        "campaigns": [],
        "assets": [],
        "wallets": [],
        "partners": [
            "asfas-nr3il4"
        ],
        "_id": "65366366362cd70266fc9959",
        "deleteAt": "2024-01-23T12:13:26.615Z",
        "createdAt": "2023-10-23T12:13:26.616Z",
        "updatedAt": "2023-10-23T12:13:26.616Z",
        "__v": 0,
        "isAnonymous": true,
        "isGuest": false,
        "id": "65366366362cd70266fc9959",
        "token": "eyJhbG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ybCxuZnRJZCJdXSwiaWF0IjoxNjk4MDYzMjA2fQ.loUw_SBj2YfjZZp783AKNR2mZLzXLHLe7YQ8McPBkUU"
    }
}

2. Create a default avatar for the user

To create and render an initial avatar for your user, you need to call 3 endpoints.

2.1 Fetch all possible templates

Firstly you need to fetch all of the possible templates that you can create an avatar from. Templates are pre-configured avatar templates which make it easier for you to create an avatar via the API. To fetch the avatar templates you can call the following endpoint authenticated with the token returned on the request from step 1.

Get all templates

GET https://api.readyplayer.me/v2/avatars/templates

Headers

Name
Type
Description

Authorization*

Bearer [token]

{
    "data": [
        {
            "imageUrl": "https://readyplayerme-avatars.s3.amazonaws.com/avatar-template-images/white-female-1.png",
            "gender": "female",
            "id": "1234567890"
        },
        {
            "imageUrl": "https://readyplayerme-avatars.s3.amazonaws.com/avatar-template-images/white-male-1.png",
            "gender": "male",
            "id": "12345678901"
        }

2.2 Create a draft avatar from a template

Once you have made a call to fetch the list of templates, you can then take one of the template IDs and make a call to create a draft avatar for the user by calling the following endpoint.

Assign a specific template to the user

POST https://api.readyplayer.me/v2/avatars/templates/[template-id]

Headers

Name
Type
Description

Authorization*

Bearer [token]

Request Body

Name
Type
Description

partner*

String

Application subdomain

bodyType*

fullbody

Avatar type

{
    "data": {
        "id": "65367050b6ff020dad1ebc57",
        "partner": "default",
        "gender": "female",
        "bodyType": "fullbody",
        "assets": {
            "beardColor": 0,
            "beardStyle": "",
            "eyeColor": "9781803",
            "eyeShape": "",
            "eyebrowColor": 0,
            "eyebrowStyle": "41302445",
            "faceMask": "",
            "faceShape": "",
            "glasses": "9247416",
            "hairColor": 0,
            "hairStyle": "9247471",
            "headwear": "",
            "lipShape": "",
            "noseShape": "",
            "outfit": "",
            "shirt": "",
            "skinColor": 5,
            "skinColorHex": "#cf927a"
        }
    }
}

2.3 Fetch draft avatar

After making the call to create your new draft avatar, you can then fetch this avatar as a GLB by calling the following URL with your new avatar-id.

Fetch the assigned avatar as a GLB file

GET https://api.readyplayer.me/v2/avatars/[avatar-id].glb?preview=true

2.4 Save draft avatar

The previous steps created a draft avatar for the user, which will expire after x amount of time. To save the avatar and permanently save it for the user, you will need to save the avatar with the following endpoint:

Save updated avatar

PUT https://api.readyplayer.me/v2/avatars/[avatar-id]

Headers

Name
Type
Description

Authorization*

Bearer [token]

{
    "data": {
        "id": "65367050b6ff020dad1ebc57",
        "partner": "default",
        "gender": "female",
        "bodyType": "fullbody",
        "assets": {
            "skinColor": 5,
            "eyeColor": "9781803",
            "hairStyle": "9247471",
            "hairColor": 0,
            "beardStyle": "",
            "beardColor": 0,
            "eyebrowStyle": "41302445",
            "eyebrowColor": 0,
            "shirt": "",
            "outfit": "143549640",
            "glasses": "9247416",
            "faceMask": "",
            "headwear": "",
            "lipShape": "",
            "eyeShape": "",
            "noseShape": "",
            "faceShape": "",
            "createdAt": "2023-10-24T06:38:08.421Z",
            "updatedAt": "2023-10-24T06:38:08.421Z",
            "skinColorHex": "#cf927a"
        },
        "favorite": false,
        "default": true
    }
}

3. Fetch avatar

You can now fetch your newly saved avatar from the URL below with the avatar id.

Return avatar in glb format

GET https://models.readyplayer.me/[avatar-id].glb

4. Customize your avatar

All of the requests shown in this section are also visible in the public

You now have a working example with Ready Player Me avatars. You can go now into the section, which explains how to customize your character with outfits.

👩‍💻
Ready Player Me Postman collection
next
studio