Skip to main content
Up and Coming
February 9, 2022
Solved

Get UserID returns my application specific user ID for debugging and testing.

  • February 9, 2022
  • 1 reply
  • 4729 views

I'm getting the users information with the script below. The id it returns is the id listed on the game API section under userid. See image.  420**************

 

However when i authenticate with Oculus from my web site it returns a different number. 659************

How do I get my app to not use this application specific id for debugging and testing?

 

 

 

  void Start()
        {
            // First thing we should do is perform an entitlement check to make sure
            // we successfully connected to the Oculus Platform Service.
            Entitlements.IsUserEntitledToApplication().OnComplete(IsEntitledCallback);
        }

        void IsEntitledCallback(Message msg)
        {
            if (msg.IsError)
            {
                TerminateWithError(msg);
                return;
            }

            // Next get the identity of the user that launched the Application.
            Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);
        }

        void GetLoggedInUserCallback(Message<User> msg)
        {
            if (msg.IsError)
            {
                TerminateWithError(msg);
                return;
            }

            m_myID = msg.Data.ID;
            m_myOculusID = msg.Data.OculusID;
            var reportid = msg.GetUserReportID();
          

            id.text = "msg.Data.OculusID : " + msg.Data.OculusID + "  msg id: "+msg.Data.ID+"  msg displayname: "+msg.Data.DisplayName + "  reportid: " + reportid;


            TransitionToState(State.WAITING_TO_PRACTICE_OR_MATCHMAKE);
            Achievements.CheckForAchievmentUpdates();
        }

 

Best answer by prozac

You're looking for ovr_User_GetOrgScopedID()

 

Documentation is here:

https://developer.oculus.com/documentation/native/ps-presence/

1 reply

prozac
prozacAnswer
Meta Employee
February 11, 2022

You're looking for ovr_User_GetOrgScopedID()

 

Documentation is here:

https://developer.oculus.com/documentation/native/ps-presence/