Skip to main content

Players Data

Get Player Data

+1 Request

You can access other players' data, including achievements and purchases.

All fields marked public will be available to other players.

const result = await gp.players.fetch({
// Search by player ID
ids: [66506, 66254],
});

// Response
const { players } = result;

// Player state
players[0].state

// Examples
players[0].state.id
players[0].state.name
players[0].state.score
players[0].state.gold

// Player achievements, see Achievements section
players[0].achievements

// Examples
players[0].achievements[0].id
players[0].achievements[0].createdAt

// Player purchases, see Payments section
players[0].purchases

// Examples
players[0].purchases[0].id
players[0].purchases[0].createdAt

Stay in Touch

Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.

GamePush Community Telegram: @gs_community.

For your suggestions e-mail: [email protected]

We Wish you Success!