Users Status

Track and retrieve the status of all players in your game

ZooGames provides a status feature that allows you to update and track the status of players in your game. With this functionality, you have the flexibility to monitor and display the real-time status of players to enhance the gaming experience. This feature can be seamlessly integrated into your game, your website or your mobile application and will be also visible on the Zoo.Games platform.

Once the "isPlaying" parameter is set to "true", the system will automatically switch the player's status to "Offline" after 30 minutes of inactivity. It is recommended to update the player status every 10 minutes to keep it up to date.

Conversely, when the "isPlaying" parameter is set to "false", the offline status will be reflected in the system after a delay of 3 minutes. This ensures that the status accurately represents the player's online or offline presence.

Set user status

Optionally, you can add a note while setting up the player status. This note will provide an extra epic experience for your players. Here are some note examples:

  1. Mastering the art of virtual sword fighting!"

  2. "Embarking on an epic quest to save the kingdom."

  3. "Exploring uncharted territories in search of hidden treasures."

  4. "Unleashing magical powers to vanquish foes."

  5. etc.

Set user status

GET API_END_POINT_URL/api/analytics

Request Body

NameTypeDescription

username*

String

ZooGamesID or any string reference

gameName*

String

You game's name or any string as a reference * Recommended to use gameName as a Game ID that you have registred on Zoo.games

gameVersion

String

Can be any string like V.1.2

gameAddress

Address

Your registered game address

isPlaying

Boolean

Online or Offline status

note

String

A remark

{
"success": true,
}

We recommended you to use gameName as the Game ID you have registered to able to detect by our system to show status of Online/Offline on Zoo.games

The payload cannot exceed 50kb Usernames and game names must be unique records. Inactive records will be deleted after 1 year.

Get users status

Get users status

GET API_END_POINT_URL/api/analytics?gameName=&isOnline=true

If no query is sent, the system will return all existing records on ZooGames.

Query Parameters

NameTypeDescription

gameName

String

the game name or stat name for retrieval

isOnline

boolean

Display only online or offline users.

{
"success": true,
    "data": [
        {
        "host": "api-testnet.zoo.games",
        "user_agent": "curl/7.87.0",
        "x_vercel_ip_country": "JP",
        "x_vercel_ip_city": "Tokyo",
        "x_vercel_ip_latitude": "35.6897",
        "x_vercel_ip_longitude": "139.6895",
        "x_vercel_ip_timezone": "Asia/Tokyo",
        "timestamp": "2023-06-14T15:20:30.477Z",
        "username": "test2",
        "gamename": "goodGame",
        "gameversion": "unknown",
        "gameaddress": "unknown",
        "isplaying": false,
        "note": "",
        "status": "offline"
        }
    ]
}

Last updated