Creating and updating avatars in guest mode

Hello,

In my application we use RPM to create and modify avatars.
We are doing all this in guest mode (= without creating an RPM account for the user).
When we create and customize our avatar in the same game session. Everything works fine.

When trying to customize (with an Update operation) an avatar we created in a previous session, the server responds with an unauthorized error.

I deduce that the token used to identify a guest user has a limited time life.
Am I right?

We don’t want to bother users with creating a RPM account.
But we want to let them customize their avatar when they want.

Our previous solution was to use a photo and some avatarProperties to recreate an avatar each time the user wants to customize. It worked.

Right now we want to avoid sending the photo in the customization phase.
But updating the avatar with avatarProperties and no photo, force us to rely on an avatarId.
And in guest mode the avatarID seems to have a limited lifetime which make it not very reliable. So after a while, server refuses the update operation with an unauthorized error.

Is there a way to update avatars without photo and staying in guest mode ?

Hi there,

Yes, there is a short-lived token that lives for 15 seconds, more information on how to log in on behalf of the user can be found here: Account Linking | Ready Player Me

Basically /token returns short-lived token, /refresh turns it into a long lived token, what you need in this case in order for the token to not expire.

Hi Markus,

Thanks for your answer.
I’m using the unity API and some customized RPM samples to make my own avatar creator inside unity.
Thus I don’t directly use /token or /refresh. And I can’t find these in the unity code samples.

Digging deeper into anonymous account documentation and samples, I found a possible solution. Right now, we don’t save the created avatar on the RPM server. If we do so and keep the same user session, we could modify this avatar later without being “unauthorized”.

Hi @adriengerbex

My apologies, yes you are correct, you can use the anonymous account documentation for it.