无需开发者账户OAuth的Google Play Publisher API使用疑问
Hey there, let's tackle this frustrating issue you've been stuck on for a week. I get it—asking every regular Play Store user to set up their own OAuth project and link it to their Developer Console is way too cumbersome, and that's not what you want for your app's user experience.
Here are practical, user-friendly solutions to fix this:
Option 1: Use a Service Account + Play Console Permission Grants
This is the most straightforward approach for regular users, as it cuts out all the OAuth project creation steps:
- First, create a service account in your own Google Cloud project, and generate the corresponding JSON key file.
- Then, guide your users through a simple 2-step process in their Play Console:
- Go to the "Users and permissions" section
- Add your service account's email address as a "Comment Viewer" (or higher permission like "Editor", based on your needs)
- Once that's done, your app can use the service account key to call the Android Publisher API and fetch comments for the user's app. Users only need to do that one permission grant—no OAuth project setup required.
Option 2: Optimized OAuth Flow (Use Your Own Project)
If you prefer sticking with OAuth, don't make users build their own projects. Instead, use your own OAuth client:
- In your Google Cloud project's OAuth consent screen, add the
https://www.googleapis.com/auth/androidpublisherscope. - Build a streamlined authorization link for users. When they click it, they just need to log into their Google account and grant your app permission to access their Play Store data. No project creation, just a few clicks.
- Note: If your app is for external users, you'll need to get your OAuth app approved by Google to avoid permission restrictions.
Key Notes to Keep in Mind
- Always follow Google's API terms of service: only access data the user explicitly authorizes, and never misuse or store data unnecessarily.
- For non-technical users, Option 1 is usually better—it feels more familiar (just adding a user in their Play Console) compared to granting a third-party app account access.
内容的提问来源于stack exchange,提问作者lavanya velu
相关产品推荐
相关产品推荐

