Do you need your own OAuth app?
Composio managed: yes (checked 2026-10-20). Composio-managed OAuth is available. You can start without your own OAuth app.
Bring your own app when:
- The consent screen must show your brand, not "Composio"
- You need custom scopes
- You need your own rate quota (managed apps share quota)
- You need polling faster than 15 minutes (the managed minimum)
- You connect to a custom or self-hosted instance
- Enterprise customers require your branding end-to-end
- Leaving managed auth for Gmail means your own Google Cloud project must pass brand verification, restricted-scope verification and an annual CASA assessment before more than 100 users can connect (inferred from Google's rules; Composio's own verification status is not public to us).
- Your users must see your app name on the Google consent screen; Google's verification checks that the consent screen shows the correct app name.
Composio lists Gmail as a Composio-managed OAuth toolkit, so stay on managed auth until you have a concrete reason to leave. If you do, start in Testing mode (100 test users, 7-day tokens) and pick the narrowest scope: gmail.send alone avoids restricted-scope verification and CASA. Copy the redirect URI from the Composio dashboard (Create Auth Config).
Redirect URI: Copy the callback URL from the Composio dashboard (Create Auth Config); don't hard-code it.
Switching to your own app affects new connections only. Existing connected accounts stay on the old auth config until users re-authenticate.
Composio managed-auth directory ↗Custom app vs. managed app ↗White-labeling authentication ↗
Verdict
Under an hour to a working test app; weeks to months to production for an agent that reads mail. gmail.readonly and gmail.modify are restricted scopes: verification plus an annual third-party CASA assessment. A send-only agent (gmail.send) scores 3: sensitive-scope verification, no CASA.
- Difficulty
- 5/5 · Very hard
- Approval
- scope verification
- Confidence
- medium
- Test before approval
- Yes
Why this score
- CASA third-party security assessment (annual) (security-assessment, weight 5)
send-only path: 3/5 · Moderate
Dev-ready
Your project is in Testing mode and you, as a listed test user, can authorize Gmail scopes.
- Hands-on
- 0.5–1 h
- Wait
- no wait
Pilot-ready
Up to 100 named test users outside your team can connect, behind a warning screen, re-consenting every 7 days.
- Hands-on
- 0.25–1 h
- Wait
- no wait
Limits until next
- Testing mode is limited to 100 test users listed on the consent screen.primarysource
- Test-user authorizations, including refresh tokens, expire 7 days after consent.primarysource
- B2B shortcut: a Google Workspace admin who marks your app Trusted lifts the 100-test-user cap and 7-day expiry for that organization.primarysource
Production-ready
Any Google user can connect with no unverified-app screen and no user cap.
- Hands-on
- 10–40 h
- Wait
- 14+ days
Limits until next
- Google says restricted-scope verification "can potentially take several weeks" and, elsewhere, "several months" depending on sensitivity. No upper bound is published. 14 days is our floor reading of "several weeks".primarysource
- Until verified, an app that shows the unverified-app screen is capped at 100 new users in total.primarysource
Next actions
- Pick the narrowest Gmail scope (both) — done when: Scope list and profile (send-only vs read/modify) are fixed.
- Create the project and OAuth client (human) — done when: A test user completes consent and you get a token.
- Brand and scope verification (both) — done when: Brand and scope verification approved.
Blockers
- criticalReading mail (gmail.readonly / gmail.modify) needs restricted-scope verification and a paid, annual third-party CASA assessment. (Production-ready)Workaround: Ship a send-only agent first (gmail.send), or sell to Workspace orgs whose admins mark the app Trusted.An agent can help with this.
- highIn Testing mode every test user's authorization expires after 7 days, so pilots silently disconnect weekly. (Pilot-ready)Workaround: Build a re-consent prompt, or have the customer's Workspace admin mark the app Trusted.An agent can help with this.
- mediumVerification needs a homepage on a verified domain you own; a login page or unowned domain fails. (Production-ready)Workaround: Publish a real homepage and privacy policy on your domain before submitting.An agent can help with this.
Before you start
- Google Cloud project with the Gmail API enabled (human · Dev-ready): Google recommends separate projects for testing and production.
- Verified domain, homepage and privacy policy (human · Production-ready): The homepage must be on a verified domain you own (verified in Search Console by a project Owner or Editor) and describe the app.
- Demo video (human · Production-ready): Unlisted YouTube video showing the OAuth grant flow in English, the app name on the consent screen, and each scope in use.
- CASA assessor (restricted scopes only) (human · Production-ready): Contract an App Defense Alliance-authorized assessor once Google tells you to start.
Gates
- Testing mode: 100 test users, 7-day refresh tokens (testing cap)Applies when: until the app is published. Required for Pilot-ready.
- Sensitive scope verification (gmail.send) (scope review)Applies when: sensitive scopes in production. Required for Production-ready.Duration: Brand verification first: automated check usually a few minutes; manual review usually 2-3 business days. Scope review time beyond that is not published.primarysource
- Restricted scope verification (gmail.readonly / gmail.modify) (scope review)Applies when: read/modify profile (default for AI agents). Required for Production-ready. Skipped for: send-only.Duration: Several weeks, possibly several months.primarysource
- CASA third-party security assessment (annual) (security assessment)Applies when: restricted Gmail scopes. Required for Production-ready. Skipped for: send-only.Cost: Paid to the assessor. One vendor (Secusy) lists AL1 at $499–$3,000/yr and AL2 at about $5,400/yr.secondaryReported by developers, not a commitmentsourceRecurring: Annual recertification; apps are assigned AL1 or AL2.primarysource
Scopes
| Scope | Sensitivity | Why | Review trigger |
|---|---|---|---|
| https://www.googleapis.com/auth/gmail.send | sensitive | Send email on the user's behalf.Draft: The agent sends emails the user drafts or approves; it never reads the mailbox. | Sensitive-scope verification. No CASA. |
| https://www.googleapis.com/auth/gmail.readonly | restricted | Read messages to summarize or triage the inbox.Draft: The agent reads new messages to produce a daily summary the user requested; narrower scopes can't return message bodies. | Restricted-scope verification plus annual CASA if data touches your servers. |
| https://www.googleapis.com/auth/gmail.modify | restricted | Read, label, archive and draft replies. | Restricted-scope verification plus annual CASA. |
Setup steps
- Pick the narrowest Gmail scope (decide · both · ~15 min)
- If the agent only sends, request gmail.send only (sensitive, no CASA).
- If it must read mail, budget for restricted-scope verification and CASA.
- Create the project and OAuth client (create · human · ~30 min)
- Create a project, enable the Gmail API.
- Google Auth Platform → Branding (name, support email, logo, homepage, privacy policy, authorized domains).
- Audience: External, Testing; add test users.
- Clients → Web application, with the Composio redirect URI.
- Brand and scope verification (submit · both)
- Verify the domain in Search Console.
- Record the demo video and write per-scope justifications.
- Submit in the Verification Center and answer Google's emails.
- CASA assessment (restricted scopes) (submit · human)
- When Google asks, engage an authorized assessor and complete the assessment.
- Calendar the annual revalidation.
OAuth configuration
- Redirect URIs:
- Adding redirect URLs or changing the product name after verification can trigger re-verification.secondaryReported by developers, not a commitmentsource
- PKCE:
- Supported: plain and S256.tested · probesource
- Token lifetime:
- In Testing mode, refresh tokens expire 7 days after consent. Otherwise a refresh token stops working after 6 months unused, or on password change when it holds Gmail scopes.primarysource
- Refresh:
- Max 100 refresh tokens per Google Account per OAuth client; older ones are revoked past the limit.primarysource
- Rate limits:
- Unverified apps: 100 new users in total after the unverified-app screen is shown.primarysource
Agent vs. human
Agent can do
- Classify requested scopes and recommend the narrowest set.
- Draft scope justifications and the demo-video shot list.
- Audit the homepage and privacy policy for the required disclosures.
- Prepare CASA questionnaire answers and scanner evidence.
Human must do
- Google login and project ownership.
- Search Console domain verification.
- Record the demo video.
- Contract and pay the CASA assessor; reply to Google Trust & Safety emails.
Probe results
GET https://accounts.google.com/.well-known/openid-configuration→ 200OIDC discovery: authorization_endpoint https://accounts.google.com/o/oauth2/v2/auth, PKCE plain and S256. (2026-10-19T20:37:19Z)GET https://accounts.google.com/o/oauth2/v2/auth?client_id=oauth-atlas-probe&redirect_uri=https%3A%2F%2Fexample.com%2Fcb&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly→ 302 → https://accounts.google.com/signin/oauth/error?authError=Cg5pbnZhbGlkX2NsaWVudBIfVGhlIE9BdXRoIGNsaWVudCB3YXMgbm90IGZvdW5kLiCRAw&flowName=GeneralOAuthFlow&client_id=oauth-atlas-probeFake client rejected up front: authError decodes to "invalid_client: The OAuth client was not found." (2026-10-19T20:37:19Z)
Evidence
- [ev-testing] Testing mode: up to 100 test users; authorizations expire after 7 days. primary high confidence
Authorizations by a test user will expire seven days from the time of consent.
https://support.google.com/cloud/answer/15549945official-doc · retrieved 2026-10-19T20:43:42Z - [ev-scopes] gmail.send is sensitive; gmail.readonly and gmail.modify are restricted. primary high confidence
Restricted scopes Scope code Description https://mail.google.com/ Read, compose, send, and permanently delete all your email from Gmail.
https://developers.google.com/workspace/gmail/api/auth/scopesofficial-doc · retrieved 2026-10-19T20:43:54Z - [ev-casa] Restricted-scope apps need an annual security assessment (CASA, AL1 or AL2). primary high confidence
To maintain the security of Google users' data, applications requesting access to restricted scopes must undergo an annual security assessment.
https://support.google.com/cloud/answer/13465431official-doc · retrieved 2026-10-19T20:43:49Z - [ev-restricted-time] Restricted-scope verification can take several weeks. primary medium confidence
For this reason, the restricted scopes verification process can potentially take several weeks to complete.
https://developers.google.com/identity/protocols/oauth2/production-readiness/restricted-scope-verificationofficial-doc · retrieved 2026-10-19T20:43:44Z - [ev-brand] Brand verification: automated in minutes, manual review usually 2-3 business days. primary high confidence
The automated brand verification process typically takes a few minutes after you click the Verify Branding button.
https://developers.google.com/identity/protocols/oauth2/production-readiness/brand-verificationofficial-doc · retrieved 2026-10-19T20:44:00Z - [ev-homepage] The homepage must be on a verified domain you own. primary high confidence
The homepage must be hosted on a verified domain you own
https://support.google.com/cloud/answer/13464321policy · retrieved 2026-10-19T20:43:46Z - [ev-video] The demo video is uploaded to YouTube as Unlisted. primary high confidence
Upload the video to YouTube Studio and set Visibility as Unlisted .
https://developers.google.com/identity/protocols/oauth2/production-readiness/restricted-scope-verificationofficial-doc · retrieved 2026-10-19T20:43:44Z - [ev-trusted] A Workspace admin marking the app Trusted lifts the test-user cap and 7-day expiry for that org. primary high confidence
When a Google Workspace administrator marks an app as Trusted , it is treated as an internal application for that organization.
https://developers.google.com/identity/protocols/oauth2/production-readiness/overviewofficial-doc · retrieved 2026-10-19T20:43:58Z - [ev-casa-cost] CASA AL2 about $5,400/yr (one vendor, Secusy); AL1 $499–$3,000. secondary low confidence Reported by developers, not a commitmenthttps://www.secusy.ai/blog/google-casa-assessment-costpricing · retrieved 2026-10-20
- [ev-probe-authorize] Fake client_id is rejected with invalid_client at the authorize endpoint. tested high confidencehttps://accounts.google.com/o/oauth2/v2/authtest · retrieved 2026-10-19T20:37:19Z
Unknowns
- Actual end-to-end time for restricted-scope verification plus CASA: Google gives "several weeks" to "several months", no upper bound.
- CASA price: only vendor price lists (secondary); Google publishes none.
- Whether Composio's managed Gmail app is verified for restricted scopes (not public to us).
- Sensitive-only (gmail.send) review duration beyond brand verification: not published.
Corrections
- 2026-10-20: Google CASA tiers —
CASA "Tier 2 / Tier 3".→ Assurance levels AL1 / AL2, assigned by Google; annual revalidation. (Google renamed the tiers.)