Skip to main content
New Participant
April 3, 2024

MetaXR Users.GetLoggedInUser() always returning oculus id = 0 and empty name

  • April 3, 2024
  • 3 replies
  • 2220 views

Hi,
I've been trying to get the Shared Anchor sample to work for weeks now with no results (https://github.com/oculus-samples/Unity-SharedSpatialAnchors?tab=readme-ov-file)

All of my debugging has lead to the method in the subject (Users.GetLoggedInUser) not returning the logged user's data correctly, which usually comes from a failed authentication

The app has been correctly deployed to the developer hub, the API key is correct and set in both fields into the Oculus -> Platform in Unity

UserID, UserProfile and User Age Group permissions under data usage have all been approved (and reapproved)

Most of the solutions found in other parts of the forum just don't work for me

Now I'm left wondering why it doesn't work

https://imgur.com/a/g4Bww1y
https://imgur.com/a/YiyQLp3
https://imgur.com/a/JLf1Z3F

    3 replies

    New Participant
    April 16, 2024

    Same problem here, returning user_id = 0 and consequent message "You are not authenticated to use this app. Shared Spatial Anchors will not work."

     

    New Participant
    April 16, 2024

    Just found a solution: sign the Build and upload the .apk to ALPHA channel of your META APP.

    Then invite your META User from the Release Channel of Meta Developer Dashboard.

    Now I get both Username and User ID

    Inspiring
    April 30, 2024

    If you want to share anchor with others, you need app permissions for sharing anchor data. 

    1.  apply a application at "app manager", https://developer.oculus.com/manage/

    2. apply some permisssion for application

    3. invite tester to your application so that they can share anchor with each other.