question

Sergio Mireles avatar image
Sergio Mireles asked

Get email value from Master Player Account

I have a session going (using Device ID), and I want to show the registered (if there's one) email from that Master User info...

Using PlayFabClientAPI.GetAccountInfo with PlayFabID as the only parameter, I'm looking in my GetAccountInfoResult object for an email property, but nothing!

Can somebody give tell me what am I doing wrong?

Player DataAccount Management
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

I believe you’re talking about the email registered under the Master player account, not the contact email:

Is that correct? In that case, PlayFabClientAPI.GetAccountInfo does retrieve that, it’s in GetAccountInfoResult -> PrivateInfo -> Email: https://docs.microsoft.com/en-us/rest/api/playfab/client/account-management/getaccountinfo?view=playfab-rest#userprivateaccountinfo


1.png (19.0 KiB)
2 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.

Sergio Mireles avatar image Sergio Mireles commented ·

@Citrus Yan Exactly! That was it. I had it infront of my nose, never explored the properties of PrivateInfo, I feel so dumb!

0 Likes 0 ·
luizcarlos-bs avatar image luizcarlos-bs commented ·

Something changed?
I'm using GetAccountInfoResult and that say there is no PrivateInfo

0 Likes 0 ·
Darius Vu avatar image
Darius Vu answered

I think that you should use PlayFabClientAPI.GetPlayerProfile() to get the ContactEmailAddresses in PlayerProfileModel.

You can refer this in here:

https://docs.microsoft.com/en-us/rest/api/playfab/client/account-management/getplayerprofile?view=playfab-rest

And this is the quick tutorial for you.

https://docs.microsoft.com/en-us/gaming/playfab/features/data/playerdata/getting-player-profiles

Hope this is useful for you.

2 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.

Citrus Yan avatar image Citrus Yan commented ·

I think @Sergio Mireles meant getting the login email registered under the master player account, and GetAccountInfo does retrieve that, it’s in GetAccountInfoResult -> PrivateInfo -> Email

1 Like 1 ·
Sergio Mireles avatar image Sergio Mireles commented ·

@Luc Vu, I was talking about the Master Account info... But still, this will help me eventually. Thanks helping!

1 Like 1 ·

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.