GCP未验证应用新用户计数规则咨询:含广告API及脚本场景
Understanding Unverified App User Counting in GCP & Google Apps Script Behavior
Let’s break down your questions clearly—since un verified app quota rules can feel opaque when you’re expecting low user volume:
How GCP Counts "New Users" for Unverified Apps
GCP’s un verified app quota tracks unique Google accounts that have completed an OAuth 2.0 authorization flow for your app, not IP addresses, device IDs, or repeated logins. Here’s the key logic:
- A "new user" is defined as a Google account that grants your app permission (via the OAuth consent screen) for the first time.
- Once an account has authorized your app, any subsequent access—even from different devices, IPs, or via refresh tokens—does not count against the new user quota.
- This means your 60% quota usage must stem from 60 distinct Google accounts that have authorized your app at some point, not repeated activity from your own account.
Does Google Apps Script’s IP Variation Trigger New User Counts?
No, it doesn’t. When you use a refresh token in Google Apps Script to access APIs on your behalf:
- The script is authenticated using your Google account’s identity (linked directly to the refresh token).
- Changes in the script’s outgoing IP address (common, since Google’s servers use dynamic ranges) don’t alter the authenticated user identity.
- Every API call made via this method is tied to your account, so it won’t generate new user entries in the quota.
Troubleshooting Your Unexpected Quota Usage
Since you’re confident you don’t have 60 actual new users, here are actionable checks:
- Review OAuth Consent Screen User List: In your GCP Project, navigate to APIs & Services > OAuth consent screen and check the "Test users" or "External users" section (based on your app’s publishing status). This will show all accounts that have authorized your app.
- Check for Accidental Authorizations: Did colleagues, contractors, or test accounts grant access to your app at any point? Even one-time authorizations count towards the quota.
- Verify Scope Change Re-Consents: If you modified your app’s OAuth scopes recently, existing users might have been prompted to re-authorize—but this doesn’t count as a new user (it’s just updated consent for the same account).
- Rule Out Reporting Lags: Occasionally, GCP’s quota metrics can have a 24-hour delay. Wait a day to see if the count adjusts, though this is less common for user-based quotas.
内容的提问来源于stack exchange,提问作者Epiquin
相关产品推荐
相关产品推荐

