Trouble equipping assets

The PUT https://api.readyplayer.me/v1/avatars/:id/equip endpoint doesn’t seem to be working, or at least only working very infrequently. Most of the time, when I select an asset, it isn’t equipped. Instead, the avatar will end up being equipped with a white T-shirt and black jeans. Like this:

This is the request I sent:

URL: https://api.readyplayer.me/v1/avatars/666022f78a77da21a29dfa76/equip

Headers: {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'X-API-KEY': <API_KEY>, 'Content-Length': '61', 'Content-Type': 'application/json'}

body: b'{"data": {"assetId": "04ae2874-1e6e-4a0b-bf87-6e30600285ac"}}'

I get the 204 response, but the assets aren’t equipped.

Is there a problem? Or am I doing something wrong?

2 Likes

Update

It seems to only be clothing. Hats, scarves, eyeshapes, etc., all seem to work fine.

Hi Andrew, could you open a ticket with our Support team indicating your subdomain so we can look further into it?

I’m having a similar problem, but I’m using another endpoint:

PATCH: https://api.readyplayer.me/v2/avatars/{avatarId}

When I call this endpoint it returns me the same avatar with no changes

Ah, I forgot to do this. I’ll do this today.

Hi @andrew_802 as I replied in the ticket for you already. To equip the asset, it needs to be available in your application/subdomain. You can only equip assets that are available in your application/subdomain.

@Markus_RPM You mean by including the applicationIds query parameter? I’m already doing that.

Hi Andrew,

If you have uploaded this specific asset, you need to make it available in your subdomain/application in order to equip it. You can do it via Studio by going into the “Asset Manager” → “Add and Manage” section and then choosing the outfit and checkmarking the correct subdomain.

I didn’t upload this asset. It was just returned when I made a call to GET https://api.readyplayer.me/v1/assets with these query parameters and headers,

params = {
            'applicationIds': settings.RPM_APP_ID,
            'limit': 100,
}
params.update(request.query_params)
headers = {
            'X-API-KEY': settings.RPM_API_KEY,
            'X-APP-ID': settings.RPM_APP_ID,
}

For example, this asset was returned with the above query parameters and headers:

{
    "name": "designer3898",
    "organizationId": "65935bf4f1170a10f6f9a77f",
    "locked": false,
    "type": "top",
    "gender": "neutral",
    "iconUrl": "https://files.readyplayer.me/asset/iconUrl/013660ef-2d45-406e-bd6f-3f6c0ea390c9/49064a1e-610b-4466-a6c3-3dc16e428c81-1707443644646.glb",
    "assetId": "013660ef-2d45-406e-bd6f-3f6c0ea390c9"
}

And I was unable to equip it.


I am trying this assets (outfit-archer-01-v2-m) but not equipped.
Whereas it showing in my application studio.
@Markus_RPM

I’m only receiving two hair assets now, even though I have many, many more in the catalog.

Hi @Markus_RPM

I hope this message finds you well.

I wanted to bring to your attention some critical issues we have been facing with the Ready Player Me project. We’ve been encountering numerous bugs in both the web module and the REST API. These issues are causing significant delays in our project timeline.

Given the urgency, I kindly request that we prioritize thorough testing and debugging for this project. It is essential that we identify and resolve these bugs as soon as possible to prevent further delays.

Thank you for your prompt attention to this matter.

After you make the PATCH call, you have do a PUT to save the avatar. I just figured this out when trying to change skin color using the REST API.

2 Likes

Not working for outfit

Sorry, I was referring to someone else’s post. PATCH is only used for changing hair, skin, eyebrow, beard, and eye color.

@Markus_RPM I’m also still having problems. By the way, I didn’t mark this issue as solved. Can you please change it back?

@andrew_802 ok
can you change any outfit of your avatar?

I’ve been having some problems equipping certain assets, but have been able to equip at least some outfits. You should be using PUT, though, not PATCH to equip assets, See PUT - Equip an asset | Ready Player Me

1 Like

Hello all!

@andrew_802 I think the reason why it was marked as solved, was because that specific outfit you were trying to equip was not available in your application at the time. However, right now I see that the asset: 013660ef-2d45-406e-bd6f-3f6c0ea390c9 is available.

Are you seeing any error messages when it comes to equipping the asset you could share with us? Responding to @chandan_kashyap as well.