Retrieving Player Title data Private Playfab

Hello,

I am trying to find a way to retrieve player data private, specifically, I have it working where it has Stored it successfully to Playfab… However bringing it down I was using link:Player Data Management - Get User Data - REST API (PlayFab Client) | Microsoft Learn

, or using the method “GetTitleDataRequest”, to trying to retrieve it, is not working or not doing it right… also trying to do the same for Player Statistics… here is my code below, hopefully its a simple misunderstanding or wrong method or field?

Player Data Title private retrieval method:

public void ClientGetTitleData()
    {
        PlayFabClientAPI.GetTitleData(new GetTitleDataRequest(),
            result =>
            {
                if (result.Data.Keys == null)
                {
                    Debug.Log("No Player Name");
                }
                else
                {
                    Debug.Log("PlayerName: " +  result.Data["PlayerName"]);
                }
            },
            error =>
            {
                Debug.Log("Got error getting titleData:");
                Debug.Log(error.GenerateErrorReport());
            }
        );
    }

also below is the Player statistics that are not working or getting the stats:

void OnDataReceived(GetPlayerStatisticsResult result)
    {
        if(result.CustomData != null)
        {
            foreach(var eachstat in result.Statistics)
            {
                if(eachstat.StatisticName.Equals("PlayerGender"))
                {
                    P_Gender_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerSkinColor"))
                {
                    P_SkinColor_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerHair"))
                {
                    P_HairType_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerHairColor"))
                {
                    P_HairColor_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerShirt"))
                {
                    P_Shirt_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerShirtColor"))
                {
                    P_ShirtColor_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerPants"))
                {
                    P_Pants_Index = eachstat.Value;
                }
                if (eachstat.StatisticName.Equals("PlayerPantsColor"))
                {
                    P_PantsColor_Index = eachstat.Value;
                }
            }
        }
        else
        {
            var randGender = new System.Random();
            int resgender = randGender.Next(0, 2);
            P_Gender_Index = resgender;
            System.Random randSkinColor = new System.Random();
            P_SkinColor_Index = randSkinColor.Next(0, 4);
            System.Random randHairColor = new System.Random();
            P_HairColor_Index = randHairColor.Next(0, 3);
            while (P_SkinColor_Index == P_HairColor_Index)
                P_HairColor_Index = randHairColor.Next(0, 3);
        }
    }

So good news, i did get the player statistics working, able to read stats now… However still trying to Read Player Title Data private… any idea? attached is the image.

finally got it to work, so something similar to the get player stats method, here is the code example below, hope it comes in handy for someone:

    public void PlayerData(GetUserDataResult result)
    {
        if(result.Data != null)
        {
            foreach(var playerData in result.Data)
            {
                if (playerData.Key == "PlayerName")
                {
                    IF_DisplayName.text = playerData.Value.Value;
                }
            }
        }
    }

    void GetPlayerName()
    {
        PlayFabClientAPI.GetUserData(
            new GetUserDataRequest(), PlayerData, OnError);
    }