cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Avatar preview image as profile image

Anonymous
Not applicable
Hi..
I am trying to apply the oculus avatar preview image as the sprite of Unity Canvas image.
But message.Data.ImageURL does not return any URL for image. Please guide me..

Thanks in advance..

4 REPLIES 4

EranJordan
Level 3
We achieve this by requesting an access token through Users.GetAccessToken(), then getting the avatar preview through https://graph.oculus.com/[USER_ID]?access_token=[USER_TOKEN]&fields=avatar_v2{avatar_image{uri}}
(Where [USER_ID] is your Oculus ID and [USER_TOKEN] is the value received from the token function call)

You will then get a json that you can parse to get to the image url.

Ross_Beef
Level 7
Thanks @EranJordan for your response. We'll be adding this to our official documentation shortly.

Anonymous
Not applicable


We achieve this by requesting an access token through Users.GetAccessToken(), then getting the avatar preview through https://graph.oculus.com/[USER_ID]?access_token=[USER_TOKEN]&fields=avatar_v2{avatar_image{uri}}
(Where [USER_ID] is your Oculus ID and [USER_TOKEN] is the value received from the token function call)

You will then get a json that you can parse to get to the image url.


Thank you so much.. Sorry for the late response.

Florian_Brink
Level 4

Hi guys, the following url returns a json containing only the user id, and no image url. I'm guessing this method is now outdated...?

 

Are you aware of any other way to get the avatar image by any chance?