canonical: https://jentic.com/apis/googleapis.com/games

# Google Play Games Services API

The Google Play Games Services API lets game developers add social and progression features to their titles, including leaderboards, achievements, saved games, events, and player profiles. It backs the Play Games SDKs that ship in mobile games, and exposes server-side endpoints for verifying scores, awarding achievements, and querying player data. The API also supports Recall and Play Grouping access tokens for cross-device account linking.

## For AI agents

Award achievements, post leaderboard scores, read player profiles, and verify game state for Play Games-enabled titles. Designed for game backends and tools that operate on a player's progression data.

## Scope

Does not handle achievement or leaderboard configuration, account resets, or store listings - use Games Configuration for setup, Games Management for resets, and Android Publisher for the Play store.

## Capabilities

- Unlock and increment achievements for a player with achievements.unlock and achievements.increment
- Submit scores to a leaderboard and read leaderboard windows around a player
- Read a player's profile, including display name and avatar URL
- Manage saved game snapshots for cross-device progression
- Record and query game events used to drive quests and analytics
- Generate Play Grouping and Recall tokens for cross-device account linking
- Reveal hidden achievements once unlock criteria are met

## Use cases

### Server-Authoritative Achievement Awarding

Mobile games that compute progression on a backend (rather than trusting the client) need a way to grant achievements only when the server has validated the action. The Play Games achievements endpoints accept a player's auth code and unlock or increment achievements server-side, preventing tampering by modified clients. This is the standard pattern for competitive or rewarded titles.

Example prompt: Call POST /games/v1/achievements/{achievementId}/unlock with the player's OAuth credentials after the backend validates that the unlock condition is met.

### Live Leaderboards for Competitive Modes

Competitive game modes need leaderboards that show a player's position relative to peers and friends. The leaderboards endpoints submit scores and return a window of nearby entries, allowing the game UI to render context such as 'you are 3 places below your friend'. Scores can be scoped per session, day, week, or all time.

Example prompt: Call POST /games/v1/leaderboards/{leaderboardId}/scores to submit a new high score and then GET the leaderboard window around the player.

### Cross-Device Progression with Saved Games

Single-player titles that span phone, tablet, and PC need to sync save data across devices. The snapshots resource stores a binary save plus metadata against the player's Google account, and the API supports reading, writing, and resolving conflicts. This removes the need for the developer to operate their own save service.

Example prompt: Call GET /games/v1/snapshots to list saves, then PATCH /games/v1/snapshots/{snapshotId} to update the latest save with the current game state.

### Agent-Driven Player Lookups

A community management tool can use an AI agent to look up a player's profile, recent achievements, and leaderboard position when investigating a support ticket. Through Jentic, the agent calls the players, achievements.list, and leaderboards endpoints with scoped credentials and returns a summary, without holding raw OAuth tokens.

Example prompt: Use Jentic to search 'get a play games player profile', load the players.get schema, and execute it for the playerId in the support ticket.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /games/v1/achievements | List achievements defined for the game |
| POST | /games/v1/achievements/{achievementId}/unlock | Unlock an achievement for the player |
| POST | /games/v1/achievements/{achievementId}/increment | Increment a stepwise achievement |
| POST | /games/v1/achievements/{achievementId}/reveal | Reveal a hidden achievement |
| POST | /games/v1/achievements/updateMultiple | Apply a batch of achievement updates |
| POST | /games/v1/applications/played | Mark the application as played for the user |
| POST | /games/v1/accesstokens/generatePlayGroupingApiToken | Generate a Play Grouping token |

## Key resources

- **achievements** — Unlock, increment, reveal, and list achievements for the player.
- **leaderboards** — Submit scores and read leaderboard entries and windows.
- **players** — Read player profiles, friends, and stats.
- **snapshots** — Store and retrieve cross-device saved games.
- **events** — Record and query game events for quests and analytics.

## Why Jentic

- **Setup:** Wiring the Google Play Games Services API by hand means setting up Google OAuth 2.0 with the games scope, refreshing short-lived bearer tokens, and mapping each achievement and application operation from Google's spec. Through Jentic you install once, import the Google Play Games Services API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** This runtime API mixes collection endpoints and identifiers, so scope the agent to the operations it needs, such as unlocking or incrementing an achievement. You choose that operation set, so bulk calls like updateMultiple are not included unless you add them.
- **Credential handling:** Your Google OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'unlock a Play Games achievement' or 'increment achievement progress', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Google Play Games Services Publishing API** — Configures achievements, leaderboards, and game settings before they are awarded.
- **Google Play Games Services Management API** — Resets achievements, scores, and player data for testing and moderation.
- **Google Play Developer API** — Manages app listings, in-app products, and reviews on Google Play.

## FAQ

### What authentication does the Google Play Games Services API use?

It uses Google OAuth 2.0 with the games scope. Through Jentic, OAuth refresh tokens live encrypted in the vault and agents receive scoped, short-lived access tokens.

### Can I unlock an achievement from a backend with this API?

Yes. Use POST /games/v1/achievements/{achievementId}/unlock with a server-side OAuth credential exchanged from the player's auth code. This is the recommended pattern for server-authoritative progression.

### What are the rate limits for the Google Play Games Services API?

Google enforces standard per-project and per-user quotas, typically a few hundred requests per minute. High-volume score submissions should batch via achievements/updateMultiple where possible.

### How do I post a leaderboard score through Jentic?

Search Jentic for 'submit a play games score', load the schema for POST /games/v1/leaderboards/{leaderboardId}/scores, and execute it with the score value and time scope.

### Is the Google Play Games Services API free?

Yes, the Play Games Services API has no usage cost beyond standard Play Console enrolment. Apps must be configured in the Google Play Console with the right OAuth client.

### Can I configure achievements and leaderboards with this API?

No. Configuration of achievements, leaderboards, and game settings is done via the Play Games Services Publishing API. This API is for runtime player operations.

### Can I limit what my agent is allowed to do with the Google Play Games Services API?

Yes. Because you run Jentic One yourself, your own rules decide which Google Play Games operations and credentials the agent may use. This runtime API mixes collection endpoints and identifiers, so you can scope the agent to only the operations it needs, such as unlocking or incrementing an achievement, while leaving out others. Broad calls like the batch achievements updateMultiple endpoint stay unavailable unless you explicitly add them to the agent's allowed set.
