Google Play Skill: Manage Android Apps, Subscriptions, and Reviews via AI Agent
14,115 downloads. The Google Play skill — by byungkyu via Maton — connects your AI agent to the Google Play Developer API (Android Publisher v3) using the same managed OAuth gateway pattern as other byungkyu skills. Manage in-app products, subscriptions, purchases, reviews, and app listings without implementing OAuth yourself.
For Android app developers, this opens up a category of agent-powered workflows that previously required either building a custom Google OAuth integration or manually clicking through Google Play Console.
The Problem It Solves
Google Play Console is powerful but manual. Responding to user reviews, updating in-app product prices, verifying purchase tokens, or pulling subscription data all require navigating through a web interface. The underlying API supports all of these programmatically — but it requires OAuth 2.0 with specific Android Publisher scopes, service account configuration, or user-level OAuth flows that are non-trivial to implement correctly.
The Maton gateway absorbs this complexity. Your agent sends requests to gateway.maton.ai/google-play/... with your MATON_API_KEY, and Maton injects the authorized Google OAuth token before proxying to androidpublisher.googleapis.com.
Core Concept: Gateway Proxy Pattern
Every Google Play API endpoint is accessible at:
https://gateway.maton.ai/google-play/{native-api-path}
Where {native-api-path} maps directly to the Android Publisher API. For example:
androidpublisher/v3/applications/{packageName}/inappproductsandroidpublisher/v3/applications/{packageName}/reviews
Authentication: Authorization: Bearer $MATON_API_KEY
Deep Dive
In-App Products (One-Time Purchases)
import urllib.request, os, json
package = "com.example.app"
# List all in-app products
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/inappproducts'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
products = json.load(urllib.request.urlopen(req))
# Create a new in-app product
data = json.dumps({
"packageName": package,
"sku": "premium_upgrade",
"status": "active",
"purchaseType": "managedUser",
"defaultPrice": {
"priceMicros": "990000", # $0.99
"currency": "USD"
},
"listings": {
"en-US": {
"title": "Premium Upgrade",
"description": "Unlock all premium features"
}
}
}).encode()
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/inappproducts',
data=data, method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')Subscriptions
# List subscriptions
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/subscriptions'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
# Create a monthly subscription
data = json.dumps({
"productId": "monthly_premium",
"basePlans": [{
"basePlanId": "p1m",
"autoRenewingBasePlanType": {
"billingPeriodDuration": "P1M"
}
}],
"listings": [{
"languageCode": "en-US",
"title": "Premium Monthly"
}]
}).encode()
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/subscriptions',
data=data, method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')Purchase Verification
# Verify a one-time purchase
product_id = "premium_upgrade"
token = "purchase_token_from_client"
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/purchases/products/{product_id}/tokens/{token}'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
purchase = json.load(urllib.request.urlopen(req))
# Acknowledge the purchase (required within 3 days or Google refunds)
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/purchases/products/{product_id}/tokens/{token}:acknowledge',
data=json.dumps({"developerPayload": ""}).encode(),
method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')User Reviews
# List recent reviews
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/reviews?maxResults=50'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
reviews = json.load(urllib.request.urlopen(req))
# Reply to a review
review_id = "review_id_here"
data = json.dumps({
"replyText": "Thank you for your feedback! We've addressed this in version 2.1."
}).encode()
req = urllib.request.Request(
f'https://gateway.maton.ai/google-play/androidpublisher/v3/applications/{package}/reviews/{review_id}:reply',
data=data, method='POST'
)
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')Full API Coverage
| Category | Operations |
|---|---|
| In-App Products | List, get, create, update, delete |
| Subscriptions | List, get, create, update, delete, archive |
| Purchases (one-time) | Get, acknowledge, refund, cancel, defer |
| Subscription purchases | Get, acknowledge, cancel, refund, defer, revoke |
| Reviews | List, get, reply |
| App Edits | Create, validate, commit, delete |
| APKs / AABs | List, upload, deobfuscation files |
| Listings | Get, update (localized store listings) |
Key Automation Use Cases
Review management agent: Pull all reviews from the past week, classify sentiment, draft responses for 1-star reviews, and queue them for developer approval before posting.
Subscription analytics: Pull subscription purchase data, calculate MRR by product, and identify churn patterns — all programmatically without manually exporting from Play Console.
Purchase server-side verification: Verify purchase tokens from your backend without implementing Google OAuth directly — the Maton gateway handles the authorization.
A/B price testing: Programmatically create and activate different price points for in-app products across markets without manually editing each listing in Play Console.
Comparison: Google Play API Access Options
| Approach | Setup Complexity | Agent-Friendly | Multi-App |
|---|---|---|---|
| Direct Google OAuth | ❌ High (service accounts or user OAuth) | ⚠️ | ⚠️ |
| Google Play Console (manual) | ✅ No setup | ❌ | ❌ |
| Google Play skill (Maton) | ✅ One-time OAuth | ✅ | ✅ Via connection ID |
| Firebase App Distribution SDK | N/A | N/A | N/A |
How to Install
clawhub install google-playSetup:
- Get your Maton API key at maton.ai/settings
- Set
export MATON_API_KEY="your-key" - Create a Google Play connection at ctrl.maton.ai
- Complete the Google OAuth flow in your browser (grants Android Publisher access)
Practical Tips
- Package names are required for almost everything. Every API call needs
{packageName}(e.g.,com.example.app). Store it as a constant in your agent workflow. - Acknowledge purchases within 3 days. Google automatically refunds unacknowledged purchases after 3 days. If your agent is managing purchase verification, the acknowledge call must happen reliably.
- Price is in micros.
"priceMicros": "990000"= $0.99. Divide by 1,000,000 to get the human-readable price. This is a common source of bugs in first-time integrations. - Review replies are one-time. You can reply to a review once, then update the reply. Agents should check whether a reply already exists before attempting to post.
- App edits are transactional. For updating store listings or APKs, you must create an edit, make changes within the edit, then commit it. Changes don't go live until the edit is committed.
- Multi-app management with connection IDs. For studios managing multiple apps with separate Google accounts, create a separate OAuth connection for each account at ctrl.maton.ai and use the
Maton-Connectionheader to route requests to the correct account.
Considerations
- Maton API key required. Like all byungkyu skills, this requires a Maton account. Check maton.ai for current pricing.
- Google Play Developer account required. You need an active developer account and must be a developer/owner on the app you're managing.
- Sensitive operations. Purchase refunds, subscription cancellations, and app edits are irreversible or have significant business consequences. Build confirmation steps into agent workflows for these operations.
- Rate limits. The Android Publisher API has rate limits at the Google account level. High-frequency polling for purchase verification should use pub/sub webhooks instead.
- Review reply visibility. Replies to user reviews are public and appear on the Play Store. Ensure any agent-generated replies go through a review step before posting.
The Bigger Picture
The Google Play skill is most valuable for indie developers and small studios who manage their apps without a dedicated operations team. Tasks that would take an hour in Play Console — reviewing and responding to the week's reviews, checking subscription metrics, updating pricing across locales — can become agent workflows that run automatically or on demand.
For larger studios, it enables a different kind of workflow: building internal tools on top of the API without implementing Google OAuth from scratch, using the Maton gateway as the authentication layer.
View the skill on ClawHub: google-play