Set up a service account in Google Cloud Console, grant it the appropriate role in the Google Play Console (Release Manager or similar), and download the JSON key file for authentication.
Authenticate using the service account key with the https://www.googleapis.com/auth/androidpublisher OAuth2 scope to obtain an access token.
Create an edit by POSTing to https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits; note the returned editId — all subsequent calls in this session require it.
Upload the APK or AAB via POST to https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/bundles (for AAB) or /apks (for APK) with the binary as the request body.
Assign the upload to a track (internal, alpha, beta, or production) by PUTting to https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits/{editId}/tracks/{track} with a releases object specifying versionCodes and status.
Commit the edit by POSTing to https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits/{editId}:commit; changes are not live until committed.
Known gotchas
An uncommitted edit expires after roughly 7 days; if not committed, all changes in that edit session are discarded silently and a new edit must be started.
Only one edit can be active per package at a time; attempting to create a second edit while one is open returns an error — the previous edit must be committed or deleted first.
AAB files must be signed with the same key enrolled in Google Play App Signing; mismatched signing keys cause the upload to be rejected with a cryptic validation error.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp