Create a guest player

Guest players are a pattern common in mobile games that allow your players to open up the game, play, and even spend without having to first create an account.

Guest players receive an on-chain wallet, and can own items on-chain, but have limited functionality compared to registered players, as shown in the following diagram. At a later point in the player’s journey, the guest player can be linked to their registered player, gaining full privileges.

When the game is initialized, create a guest player. The playerId should be persisted with the device.

curl --location --request POST 'http://127.0.0.1:8080/v1/players' \
--header 'x-mythical-environment-id: 09fcc2a5-5204-44ef-a796-aca631c1f98a'

Now, the playerId can be used to make other calls to the platform API, such as granting items.

Last updated