question

Darius Vu avatar image
Darius Vu asked

[Help] How to export the list of contact email of all players?

Dear Team,

As the question, I want to export all contact emails of all players. Do we have any way to export it in Playfab Game Manager side? Or the easiest way to export it?

Thank you so much.

Player Datagame manager
10 |1200

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

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

There is no way to do it via the Game Manager, however, we do have a API for this kind of job: GetPlayersInSegment. You can use it to retrieve all player profiles in the “All Players” segment, each player’s contact email will be included in their profiles (if they have one), please check out this API reference doc for more details about its usage: https://docs.microsoft.com/zh-cn/rest/api/playfab/admin/playstream/getplayersinsegment?view=playfab-rest

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.

Darius Vu avatar image Darius Vu commented ·

Thank you so much. I am also trying to use Azure Function to call this API function like this:

var getPlayersInSegmentResult = await adminAPI.GetPlayersInSegmentAsync(
new PlayFab.AdminModels.GetPlayersInSegmentRequest(){
                SegmentId = "CEA6XXXXXXXXXXXX",
                MaxBatchSize = 10000,
                SecondsToLive = 1800,
            });

But I have 50,000 users, so how do I use ContinuationToken to call all 50,000 data? Because the MaxBatchSize is only 10,000. I don't understand about that.

Could you give me the example code that using GetPlayersInSegment() to get all users data?

Many thanks.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Darius Vu commented ·

ContinuationToken is returned in the response: https://docs.microsoft.com/zh-cn/rest/api/playfab/server/playstream/getplayersinsegment?view=playfab-rest#getplayersinsegmentresult, just use it to get the next batch of 10,000 till you reach the end of 50,000 players. Please check out this thread for more details: GetPlayersInSegment with more than 10,000 players? - Playfab Community

0 Likes 0 ·

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.