Gmail: 10–40 hours of work, then 6–10 weeks waiting on review.
Before customers outside your Workspace can connect, you need brand verification (2-3 business days) and restricted-scope verification including CASA (Google estimates ~6 weeks; a gmail.send-only app needs ~10 business days and no CASA). A Workspace Marketplace listing is optional, and the limits that bite are the 100-user lifetime cap while unverified, 7-day tokens in Testing, customer admins who must trust the app for restricted Gmail access, and per-user Gmail quotas.c1c7c8c9c10
Most likely to stop you
The Gmail scopes an agent needs (readonly, modify, compose) are restricted: brand verification, then ~6-week restricted-scope verification ending in a CASA assessment paid to a third-party assessor and renewed yearly.
- Sheet
- Gmail OAuth app
- Difficulty
- 5 of 5
- Facts checked
- 46 of 46
- Agent can do
- 5 of 10 steps
- Checked
- 2026-11-01
- Scale
- Security assessment / multi-week + cost
Schedule
- Agent can do this (5)
- You (3)
- Provider wait (2)
Create the app
- 1Create a Google Cloud project and enable the Gmail APIYou15 min
In the Google Cloud console create a project, enable the Gmail API and open Google Auth Platform. Billing is not listed as a prerequisite.c4
- 2Publish a privacy policy (terms of service optional)Agent can do this30 min
Host a privacy policy on the same domain as your public home page, covering Gmail data use and Limited Use, and link it from both the home page and the consent screen. Terms of service are optional.c11
- 3Add authorized domains and create a Web OAuth clientAgent can do this20 min
Add the top private domains used by your redirect URIs and app links to Authorized domains, register exact HTTPS redirect URIs (localhost exempt), and store the client secret securely. Verify domain ownership in Search Console before brand verification.c5c6c12
Test with your own account
- 4Configure audience (External), branding, data access scopes and test usersAgent can do this20 min
Set Audience to External (Internal only works inside your own Workspace org), fill branding, add the narrowest Gmail scopes, and add up to 100 test users.c8
- 5Run the authorization code flow with offline accessAgent can do this15 min
Use https://accounts.google.com/o/oauth2/v2/auth with access_type=offline (and prompt=consent when a new refresh token is needed), PKCE S256 optional, and exchange codes at https://oauth2.googleapis.com/token.c2c3c13
- 6Verify Test Account Mailbox IntegrationYou15 min
Log in with a designated test Google Account to complete user consent and confirm that Gmail API actions (reading/sending mail) operate properly.c1
Go to production
- 7Record Scope Demonstration VideoAgent can do this45 min
Create a screen recording video demonstrating how a user signs in, authenticates with Google, and how requested Gmail API scopes are utilized in product context.c9
- 8Verify branding, then submit data-access verificationYou30 min
On the Branding page click Verify Branding and publish within 7 days; then in the Verification Center declare all sensitive/restricted scopes with justification, demo video and documentation links.c7c8c15
- 9Wait for Google OAuth Verification ReviewProvider wait
Brand verification (Google estimates 2–3 business days) must be completed and published first. Then scope verification: about 10 business days for sensitive scopes, about 6 weeks for restricted scopes (estimates from Google's verification FAQ).c8c14
- 10Complete the CASA security assessment (restricted scopes)Provider wait
When Google's Trust and Safety team notifies you, scan the app, fix failed CWEs, submit results to a Google-authorized assessor and obtain a Letter of Validation; renew yearly. Google charges nothing; you pay the assessor (Google's Health API page cites $500-$4,500 and 2-3 weeks for tier 2).c10c16
Review note
approvalWait min raised from 14 to 42 days because 14 only fits a sensitive-only (gmail.send) app while the verdict is about restricted scopes; difficulty 5 and effort range kept (effort is not officially stated). See the verification log
Optional listings
Not needed for your users to connect through OAuth. Worth it only for the reason given.
| Listing | Wait | Why you might want it |
|---|---|---|
| Google Workspace Marketplace public listing | Unknown | For vendors who want Workspace admins to discover and domain-install the app; not needed for OAuth and requires OAuth verification first; Google only says 'several days'.o1 |
| Marketplace CASA independent security badge (AL2) | 0–21 days | For vendors selling to security-conscious Workspace buyers; reuses an AL2 CASA result and the badge can take up to three weeks to appear.o2 |
| Recommended for Google Workspace program | Unknown | Marketing visibility for mature apps; Google evaluates applicants once a year and requires CASA AL2.o3 |
Limits after users connect
| Limit | What it means for your agent |
|---|---|
| 100 new users lifetime cap for apps showing the unverified app screen | Without completed restricted-scope verification, a multi-customer agent stops onboarding after 100 users and the cap never resets.l1 |
| Testing status: 100 test users; authorizations and refresh tokens expire after 7 days | Testing mode cannot serve real customers; agents would need re-consent weekly.l2 |
| Refresh tokens: 100 per account per client; revoked after 6 months unused or on password change for Gmail scopes | Agents must handle invalid_grant and re-prompt; idle background agents lose access.l3 |
| Gmail API quota: 1,200,000 units/min per project, 6,000 units/min per user (messages.send = 100 units) | One user's agent can send at most ~60 messages a minute via the API and bulk reads must be throttled.l4 |
| Customer Workspace admin controls: Trusted / Limited / Blocked; Limited apps cannot use restricted services | Even after verification, business customers whose admins restrict Gmail must mark the agent Trusted before restricted Gmail scopes work.l5 |
| Annual re-verification and CASA revalidation every 12 months | Recurring yearly cost and work; lapsing risks restricted-scope access for every customer.l6 |
| Limited Use: no AI/ML model training on Gmail data beyond that user's personalized model | An AI agent cannot use customer mail to train or improve general models.l7 |
Requirements
| Requirement | Needed for | Details |
|---|---|---|
| domain | production | Authorized domains must be verified in Google Search Console before configuring redirect URIs or branding links.c6 |
| privacy policy | production | Must be hosted on a verified domain and linked identically on the app homepage and OAuth consent screen.c11 |
| tos | production | Required for external production applications submitting for brand or OAuth verification.c6 |
| demo video | production | A mandatory video showing the OAuth flow and explicit scope usage must be submitted during verification.c9 |
| security assessment | production | Required if your application requests restricted Gmail scopes.c10c16 |
Scopes that change your path
| Scope | Triggers review | Notes |
|---|---|---|
https://www.googleapis.com/auth/gmail.readonly | Yes | RESTRICTED (not sensitive): restricted-scope verification plus annual CASA security assessment. gmail.modify, gmail.compose, gmail.insert, gmail.metadata and the gmail.settings scopes are restricted too.c8 |
https://www.googleapis.com/auth/gmail.send | Yes | Sensitive scope: OAuth verification (Google estimates ~10 business days); no CASA assessment.c8 |
https://mail.google.com/ | Yes | Full access scope for Gmail; classified as restricted and triggers OAuth verification plus security assessment.c8c10 |
openid | No | Standard OpenID Connect scope for basic authentication. |
email | No | Non-sensitive scope for obtaining the user's primary email address. |
When you get stuck
| What you see | Why | How to unblock |
|---|---|---|
| Test users have to reconnect every week. | In 'Testing' publishing status, test-user authorizations and refresh tokens expire 7 days after consent, and you are limited to 100 test users. | Expected during development. Move to 'In production' once verification is underway; unverified production apps show a warning and are capped at 100 new users for the project's lifetime.r1 |
| Authorization request fails with redirect_uri_mismatch error. | The redirect_uri passed in the authorization request does not exactly match an authorized URI registered on the OAuth client credentials. | Add the exact URI (including protocol, host, port, and path) to Authorized Redirect URIs in the Google Cloud Console client configuration.c13 |
| Users encounter an 'Unverified app' warning screen during OAuth sign-in. | The public application requests sensitive or restricted scopes without having completed Google's OAuth verification process. | Submit your application, domain links, privacy policy, and demo video for OAuth verification in Google API Console.c7c8 |
| Draft app listing cannot be published in Google Workspace Marketplace. | The project uses unverified sensitive or restricted scopes. | Complete OAuth verification for all declared sensitive/restricted scopes before attempting to publish the app listing.c8 |
Added in human review
Things the agent missed that a reviewer found in the provider's documentation.
- Testing publishing status: max 100 test users; test-user authorizations and refresh tokens expire 7 days after consentr1
- Unverified apps show an 'unverified app' screen and are capped at 100 new users over the project's lifetime (cannot be reset)r2
- Three distinct verification tiers: brand (2-3 business days), sensitive (~10 business days), restricted (~6 weeks); brand verification must be published before data-access verificationr3
- CASA details: independent Google-approved assessor, Letter of Assessment, reverification at least every 12 months; Google charges no fee but developer pays the assessor directlyr4
- Restricted-scope policy requirements: allowed use cases only, Limited Use data rules (no ads, restricted human access/transfers), narrowest-scope justificationr5
- Narrower Gmail alternatives: gmail.labels is non-sensitive and gmail.send is only sensitive (avoids CASA)r6
- Demo video must be unlisted on YouTube and show consent screen with app name and client ID in the address barr7
- Exemptions: internal (Workspace org) apps and personal-use/dev apps don't require verificationr8
- Refresh-token limit of 100 per Google Account per client ID; oldest silently invalidatedr9
- Restricted Gmail scopes are granted only to permitted application types (email clients, backup, productivity incl. generative AI summaries, reporting/monitoring)m1
- Gmail data may not be used to train or improve AI/ML models beyond the user's personalized modelm2
- Customer Workspace admins can set apps to Limited, which blocks restricted services, so business customers may need to mark the agent Trustedm3
- A Workspace admin can add an unverified third-party app to the trusted list, an exemption from verification for that domainm4
- Refresh tokens with Gmail scopes are revoked when the user changes password, and any token is revoked after 6 months unusedm5
- Gmail API quota is 6,000 units per user per minute and 1,200,000 per project per minute; messages.send costs 100 unitsm6
- access_type=offline is required to obtain a refresh tokenm7
- Scopes must be approved before calling them; using new unapproved sensitive/restricted scopes puts the app under the 100-user capm8
- Compliant brand verification results must be published within 7 daysm9
- Google's Health API verification page publishes CASA assessor fees of $500-$4,500 and 2-3 weeks for tier 2 (not Gmail-specific)m10
What we couldn't determine
- Exact monetary fee structure for third-party security assessments on restricted scopes is not detailed in the sources.
Evidence
Code assigns every label, not the model. Tested means we ran a probe or setup attempt. Official source means the quote appears word for word on a fetched page on the provider's domain.
Show all 46 facts and where each came from
The Gmail API is a RESTful API that allows accessing Gmail mailboxes and sending email.
“The Gmail API is a RESTful API that lets you access Gmail mailboxes and send mail.”
Google OAuth 2.0 authorization endpoint is available at https://accounts.google.com/o/oauth2/v2/auth supporting PKCE S256.
Fetched OAuth discovery document, 2026-11-01 11:41 UTC
GET https://accounts.google.com/.well-known/openid-configuration → HTTP 200
{
"issuer": "https://accounts.google.com",
"authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"token_endpoint": "https://oauth2.googleapis.com/token",
"scopes_supported": [
"openid",
"email",
"profile"
],
"code_challenge_methods_supported": [
"plain",
"S256"
],
"grant_types_supported": [
"authorization_code",
"refresh_token",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:ietf:params:oauth:grant-type:jwt-bearer"
]
}Confirmed against primary source in review 2026-11-01.
https://accounts.google.com/.well-known/openid-configuration
Google OAuth 2.0 token endpoint is located at https://oauth2.googleapis.com/token.
Fetched OAuth discovery document, 2026-11-01 11:41 UTC
GET https://accounts.google.com/.well-known/openid-configuration → HTTP 200
{
"issuer": "https://accounts.google.com",
"authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"token_endpoint": "https://oauth2.googleapis.com/token",
"scopes_supported": [
"openid",
"email",
"profile"
],
"code_challenge_methods_supported": [
"plain",
"S256"
],
"grant_types_supported": [
"authorization_code",
"refresh_token",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:ietf:params:oauth:grant-type:jwt-bearer"
]
}https://accounts.google.com/.well-known/openid-configuration
Enable the Gmail API; Google's Gmail prerequisites list only a Google Cloud project and do not mention billing.
“A Google Cloud project.”
Corrected in review round 2, 2026-11-01; it previously said: ensure billing and the Gmail API are enabled
https://developers.google.com/workspace/gmail/api/quickstart/python
Redirect URIs must use HTTPS, exempting localhost IP addresses.
“Redirect URIs must use the HTTPS scheme, not plain HTTP. Localhost URIs (including localhost IP address URIs) are exempt from this rule.”
Confirmed against primary source in review 2026-11-01.
Authorized domains must list the top private domains used by redirect URIs, origins and app links; Search Console ownership verification is needed for brand verification, not to create redirect URIs. The earlier c6 correction was never applied to this requirement note or to step st3.
“Verify the ownership of your authorized domains using the Google Search Console”
Corrected in review round 2, 2026-11-01; it previously said: Authorized domains must be verified in Google Search Console before configuring redirect URIs or branding links.
https://developers.google.com/identity/protocols/oauth2/production-readiness/brand-verification
Public applications utilizing scopes accessing user data must complete a verification process.
“If your public application uses scopes that permit access to certain user data, it must complete a verification process.”
https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow
gmail.readonly is RESTRICTED: requires restricted-scope verification plus annual CASA security assessment. gmail.modify, gmail.compose, gmail.insert, gmail.metadata, gmail.settings.* and https://mail.google.com/ are also restricted.
Corrected in review 2026-11-01; the agent originally said: gmail.readonly: Sensitive scope; triggers OAuth verification. Confirmed against primary source in review 2026-11-01.
https://developers.google.com/workspace/gmail/api/auth/scopes
OAuth verification requires submitting a demo video explaining the exact scope usage to users.
“For OAuth verification, you must submit a demo video demonstrating the journey or flow that explains the use of the requested scopes or data to users.”
Confirmed against primary source in review 2026-11-01.
https://developers.google.com/workspace/marketplace/configure-oauth-consent-screen
Restricted-scope apps (unless exempt, e.g. internal/personal use) must pass an annual CASA assessment by an independent Google-approved third-party assessor, revalidated every 12 months; developer pays the assessor.
“applications requesting access to restricted scopes must undergo an annual security assessment”
Corrected in review 2026-11-01; the agent originally said: Restricted-scope apps may/potentially need a security assessment. Confirmed against primary source in review 2026-11-01.
The privacy policy link on the app homepage and consent screen must match.
“The Privacy Policy linked on your homepage and the one linked on the app’s OAuth consent screen should be same”
Confirmed against primary source in review 2026-11-01.
Client secrets must be stored securely as they cannot be viewed again after creation.
“Store this information in a secure place such as Google Cloud Secret Manager because it will not be visible or accessible again.”
Confirmed against primary source in review 2026-11-01.
Redirect URI mismatches cause a redirect_uri_mismatch error during authorization requests.
“If the redirect_uri passed in the authorization request does not match an authorized redirect URI for the OAuth client ID, you will receive a redirect_uri_mismatch error.”
Confirmed against primary source in review 2026-11-01.
The quote is about Workspace Marketplace listing review, a separate process. OAuth verification timing: brand 2-3 business days, sensitive ~10 business days, restricted ~6 weeks.
“10 Business days”
Corrected in review 2026-11-01; the agent originally said: Google Marketplace and platform reviews typically take several days (used as OAuth review timing). Confirmed against primary source in review 2026-11-01.
Brand verification can be initiated on the Branding page via the Verify Branding button.
“If your brand requires verification, you will see a Verify Branding button in the Branding page.”
Confirmed against primary source in review 2026-11-01.
Google estimates ~6 weeks for restricted scope verification ('several weeks'), not guaranteed; CASA is the final step and can add time. Sensitive: ~10 business days; brand: 2-3 business days.
“2-3 Business days”
Corrected in review 2026-11-01; the agent originally said: 1 to 4+ weeks
Testing publishing status: max 100 test users; test-user authorizations and refresh tokens expire 7 days after consent
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Unverified apps show an 'unverified app' screen and are capped at 100 new users over the project's lifetime (cannot be reset)
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Three distinct verification tiers: brand (2-3 business days), sensitive (~10 business days), restricted (~6 weeks); brand verification must be published before data-access verification
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Google charges no fee; the developer pays a Google-authorized assessor directly. Google's own Health API verification page cites assessor fees of $500-$4,500 USD and 2-3 weeks (tier 2) / 4-6 weeks (tier 3); Gmail pages give no figure.
“fees payable to the third-party assessor, ranging from $500 to $4,500 USD”
Corrected in review round 2, 2026-11-01; it previously said: Google charges no fee, but the assessor does; the price isn't published by Google.
Restricted-scope policy requirements: allowed use cases only, Limited Use data rules (no ads, restricted human access/transfers), narrowest-scope justification
Added in review 2026-11-01.
Narrower Gmail alternatives: gmail.labels is non-sensitive and gmail.send is only sensitive (avoids CASA)
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
https://developers.google.com/workspace/gmail/api/auth/scopes
Demo video must be unlisted on YouTube and show consent screen with app name and client ID in the address bar
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Exemptions: internal (Workspace org) apps and personal-use/dev apps don't require verification
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Refresh-token limit of 100 per Google Account per client ID; oldest silently invalidated
Added in review 2026-11-01. Confirmed against primary source in review 2026-11-01.
Authorization endpoint https://accounts.google.com/o/oauth2/v2/auth is live and rejects an unknown client_id by redirecting to its error page (https://accounts.google.com/signin/oauth/error).
Sent authorization request with an unknown client_id, 2026-11-01 12:16 UTC
GET https://accounts.google.com/o/oauth2/v2/auth?client_id=oauthready-probe-invalid-client&response_type=code&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&state=probe&scope=openid (no redirects followed) → HTTP 302 Location: https://accounts.google.com/signin/oauth/error?authError=Cg5pbnZhbGlkX2NsaWVudBIfVGhlIE9BdXRoIGNsaWVudCB3YXMgbm90IGZvdW5kLiCRAw&flowName=GeneralOAuthFlow&client_id=oauthready-probe-invalid-client&as=S-1757777445%3A1793535364117435&aes=AVQXgOCDqAOK-lIMa6kIQ4er-a3E Body excerpt: Moved Temporarily Moved Temporarily The document has moved here .
Google Workspace Marketplace public listing: For vendors who want Workspace admins to discover and domain-install the app; not needed for OAuth and requires OAuth verification first; Google only says 'several days'.
“App review typically takes several days”
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/marketplace/about-app-review
Marketplace CASA independent security badge (AL2): For vendors selling to security-conscious Workspace buyers; reuses an AL2 CASA result and the badge can take up to three weeks to appear.
“it can take up to three weeks for the badge to appear on your store listing”
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/marketplace/get-featured
Recommended for Google Workspace program: Marketing visibility for mature apps; Google evaluates applicants once a year and requires CASA AL2.
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/marketplace/get-featured
100 new users lifetime cap for apps showing the unverified app screen: Without completed restricted-scope verification, a multi-customer agent stops onboarding after 100 users and the cap never resets.
“100 new users in total, after the app presents the unverified app screen”
Added in review round 2, 2026-11-01.
Testing status: 100 test users; authorizations and refresh tokens expire after 7 days: Testing mode cannot serve real customers; agents would need re-consent weekly.
“Authorizations by a test user will expire seven days from the time of consent.”
Added in review round 2, 2026-11-01.
Refresh tokens: 100 per account per client; revoked after 6 months unused or on password change for Gmail scopes: Agents must handle invalid_grant and re-prompt; idle background agents lose access.
“The user changed passwords and the refresh token contains Gmail scopes.”
Added in review round 2, 2026-11-01.
Gmail API quota: 1,200,000 units/min per project, 6,000 units/min per user (messages.send = 100 units): One user's agent can send at most ~60 messages a minute via the API and bulk reads must be throttled.
“6,000 quota units”
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/gmail/api/reference/quota
Customer Workspace admin controls: Trusted / Limited / Blocked; Limited apps cannot use restricted services: Even after verification, business customers whose admins restrict Gmail must mark the agent Trusted before restricted Gmail scopes work.
“App can only access unrestricted services.”
Added in review round 2, 2026-11-01.
https://knowledge.workspace.google.com/admin/apps/control-which-apps-access-google-workspace-data
Annual re-verification and CASA revalidation every 12 months: Recurring yearly cost and work; lapsing risks restricted-scope access for every customer.
“complete a security assessment at least every 12 months”
Added in review round 2, 2026-11-01.
Limited Use: no AI/ML model training on Gmail data beyond that user's personalized model: An AI agent cannot use customer mail to train or improve general models.
“to create, train, or improve a machine learning or artificial intelligence model”
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/workspace-api-user-data-developer-policy
Restricted Gmail scopes are granted only to permitted application types (email clients, backup, productivity incl. generative AI summaries, reporting/monitoring)
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/workspace-api-user-data-developer-policy
Gmail data may not be used to train or improve AI/ML models beyond the user's personalized model
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/workspace-api-user-data-developer-policy
Customer Workspace admins can set apps to Limited, which blocks restricted services, so business customers may need to mark the agent Trusted
Added in review round 2, 2026-11-01.
https://knowledge.workspace.google.com/admin/apps/control-which-apps-access-google-workspace-data
A Workspace admin can add an unverified third-party app to the trusted list, an exemption from verification for that domain
Added in review round 2, 2026-11-01.
Refresh tokens with Gmail scopes are revoked when the user changes password, and any token is revoked after 6 months unused
Added in review round 2, 2026-11-01.
Gmail API quota is 6,000 units per user per minute and 1,200,000 per project per minute; messages.send costs 100 units
Added in review round 2, 2026-11-01.
https://developers.google.com/workspace/gmail/api/reference/quota
access_type=offline is required to obtain a refresh token
Added in review round 2, 2026-11-01.
https://developers.google.com/identity/protocols/oauth2/web-server
Scopes must be approved before calling them; using new unapproved sensitive/restricted scopes puts the app under the 100-user cap
Added in review round 2, 2026-11-01.
Compliant brand verification results must be published within 7 days
Added in review round 2, 2026-11-01.
https://developers.google.com/identity/protocols/oauth2/production-readiness/brand-verification
Google's Health API verification page publishes CASA assessor fees of $500-$4,500 and 2-3 weeks for tier 2 (not Gmail-specific)
Added in review round 2, 2026-11-01.
Pages the agent read (11)
- https://docs.cloud.google.com/iam/docs/workforce-manage-oauth-app (official)
- https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow (official)
- https://developers.google.com/identity/openid-connect/openid-connect (official)
- https://developers.google.com/identity/protocols/oauth2/native-app (official)
- https://support.google.com/cloud/answer/15549257?hl=en (official)
- https://developers.google.com/workspace/marketplace/configure-oauth-consent-screen (official)
- https://developers.google.com/workspace/marketplace/about-app-review (official)
- https://developers.google.com/gmail/api/auth/about-auth (official)
- https://developers.google.com/gmail/api/guides (official)
- https://developers.google.com/identity/protocols/oauth2 (official)
- https://support.google.com/cloud/answer/10311615 (official)