question

Lucilo Del Castillo avatar image
Lucilo Del Castillo asked

proper Request for PlayFabClient.GetPlayerCombinedInfo in node.js?

Hello,
I am trying to get the Player Profile and other data from the PlayFabClient.GetPlayerCombinedInfo API call, using node.js.

Even do the API call return a code 200, and some data, it seems like empty or i not able to acces the point values i need like ContactEmailAddress, Created, Email Verify, etc.... I am reading for days the documentation, but dont understand if i have to specify something else on the request or in the response model.

this is the response i am getting when i do console.log (response.data)

   console.log('Player Profile loaded succefull !' + JSON.stringify(result))
    console.log('Player Profile loaded succefull !' + JSON.stringify(result.data.InfoResultPayload.AccountInfo))
    console.log(result.InfoResultPayload)
    console.log('Player Profile loaded succefull !' + result.data.PlayerProfile.VerificationStatus) 

result from the logs:

Player Profile loaded succefull !{"code":200,"status":"OK","data":{"PlayFabId":"2200B74B070BFF62","InfoResultPayload":{"UserInventory":[],"UserDataVersion":0,"UserReadOnlyDataVersion":0,"CharacterInventories":[],"PlayerProfile":{"PublisherId":"C54D2F5AB729B0B3","TitleId":"5241F","PlayerId":"2200B74B070BFF62"}}}}   

but there is not the info i need.

The Request i make is like this:

getPlayerProfile(){
          var profileRequest = {
            InfoRequestParameters: 
             {
              GetPlayerProfile: true,
  // i would add more request after i can get it working...
             }
           }
          PlayFabClient.GetPlayerCombinedInfo(profileRequest, GetProfileCallback);
        }

can anyone please enlight me with this issue ?

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gosen Gao avatar image
Gosen Gao answered

PlayFab doesn't allow clients to obtain some user information by default. If you want to get them, please navigate to [Game Manager]->[Title Settings]->[Client Profile Options], then enable the options you need.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lucilo Del Castillo avatar image Lucilo Del Castillo commented ·

I already cheked on those properties from [Game Manager]->[Title Settings]->[Client Profile Options], but still get some empty arrays

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Lucilo Del Castillo commented ·

We cannot find the player "2200B74B070BFF62" in your title "5241F" anymore. Could you please try with another PlayFabId to see if you can get the combined info?

0 Likes 0 ·
Lucilo Del Castillo avatar image Lucilo Del Castillo JayZuo ♦ commented ·

I deleted the player already, these are just for testing purpose and even if i try with others users, i cannot get the combined info. So actually my issue, i think is that i am not correctly composing the request body correctly to get that info in javascript. For example, now i am trying to get the Player DisplayName from the LoginWithCustomID API call, and facing the same problem.

i am trying doing the call like this:

function DoExampleLoginWithCustomID() {
      PlayFab.settings.titleId = PlayFabTittleId
      var loginRequest = {
          
          TitleId: PlayFab.settings.titleId,
          CustomId: customId,
          CreateAccount: true,
          InfoRequestParameters: {
            GetPlayerProfile : true,
// This part of the request is where i am not getting the response:
            ProfileConstraints: {
              ShowAvatarUrl: true,
              ShowLastLogin: true,
            },
// ---
          }
      };
    
      PlayFabClient.LoginWithCustomID(loginRequest, CustomIdLoginCallback);
}

Please can help me to figure it out what i am doing wrong?

0 Likes 0 ·
Show more comments
Lucilo Del Castillo avatar image
Lucilo Del Castillo answered

Thank you, pointing that the request call was fine, i realized that there was no display name on the accounts i was checking for. So now its working !, thanks again !

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.