EN
Gmail API guide

Gmail API Scopes Explained: Choose the Right Permissions for Your App

Google sorts Gmail scopes into three levels. gmail.readonly and gmail.modify are restricted, gmail.send is sensitive, and gmail.labels is non-sensitive. The level you request decides which verification your app goes through, so pick the narrowest scope that does the job.

Gmail Your app wants access to your Google Account
gmail.readonlyView your email messages and settingsRestricted
gmail.sendSend email on your behalfSensitive
gmail.labelsSee and edit your email labelsNon-sensitive
GET /o/oauth2/v2/auth?scope=…&include_granted_scopes=true 3 scopes
Short answer

Gmail API scopes are the OAuth permissions your app asks each user to grant. Google classifies them as non-sensitive, sensitive or restricted: gmail.labels is non-sensitive, gmail.send is sensitive, and gmail.readonly, gmail.modify and https://mail.google.com/ are restricted.

Restricted scopes trigger restricted scope verification, plus a yearly security assessment if your servers store or transmit that data. Request the narrowest scope, and add more only when a feature needs them.

Updated December 2026Classification checked against Google's Gmail scopes page

Fundamentals

What are Gmail API scopes?

A scope is a URI, such as https://www.googleapis.com/auth/gmail.readonly, that your app adds to its OAuth request. Google shows it on the consent screen, and the access token the user grants can only do what those scopes allow. That is also why a Gmail API key can't carry scopes: user data needs OAuth.

Security boundary

Google enforces scopes server-side. A token limited to gmail.readonly cannot send, modify or delete email, even if it leaks.

Verification level

The most sensitive scope in your request decides how deep Google's review goes before your app can serve external users.

User trust

Each scope is a line on the consent screen. A short, clearly justified list is easier for users and admins to approve.

Scope classification

The 3 sensitivity levels of Gmail API scopes

Google puts every Gmail scope in one of three levels. The level, not the number of scopes, decides what your app must go through before external users can grant it.

Non-sensitiveLowest risk

Limited data and no message content, such as gmail.labels.

No sensitive or restricted scope review No security assessment
SensitiveMedium risk

Acts on the user's mail without reading the whole mailbox, such as gmail.send.

Sensitive scope verification by Google No security assessment
RestrictedHighest risk

Reads or manages the mailbox, such as gmail.readonly and gmail.modify.

Restricted scope verification Security assessment if your servers store or transmit the data Revalidated every year

Sources: Google's Gmail scopes page, restricted scopes and security assessment pages. Google publishes no price for the assessment. Last verified: December 4, 2026.

Full reference

Full Gmail API scope reference

All 14 Gmail scopes, with the full URI to put in your OAuth request and the access Google describes for each. Methods are examples: one method often accepts several scopes.

Restricted Gmail scopes (8)

gmail.readonlyhttps://www.googleapis.com/auth/gmail.readonlyRead-only access to messages and settings: view email, never send or change it. Methods: messages.list, messages.get, users.watch.
gmail.modifyhttps://www.googleapis.com/auth/gmail.modifyRead, compose and send, change labels and move to trash. No immediate, permanent deletion. Methods: messages.modify, messages.send, users.watch.
gmail.metadatahttps://www.googleapis.com/auth/gmail.metadataLabels and headers, never the body or attachments. Methods: messages.get with format=metadata, users.watch.
gmail.composehttps://www.googleapis.com/auth/gmail.composeCreate and manage drafts, then send them. Methods: drafts.create, drafts.send, messages.send.
gmail.inserthttps://www.googleapis.com/auth/gmail.insertAdd emails into the mailbox, for import and migration tools. Method: messages.insert.
gmail.settings.basichttps://www.googleapis.com/auth/gmail.settings.basicSee, edit and create email settings and filters.
gmail.settings.sharinghttps://www.googleapis.com/auth/gmail.settings.sharingSensitive settings, such as who can manage the mail. Administrative use only, typically a service account with domain-wide delegation.
mail.google.comhttps://mail.google.com/Full access, including immediate, permanent deletion that bypasses the trash. Request it only for that.

Sensitive Gmail scopes (3)

gmail.sendhttps://www.googleapis.com/auth/gmail.sendSend email on the user's behalf, with no read access to the mailbox. Method: messages.send.
gmail.addons.current.message.readonlyhttps://www.googleapis.com/auth/gmail.addons.current.message.readonlyGmail add-ons only: view the open message while the add-on runs.
gmail.addons.current.message.metadatahttps://www.googleapis.com/auth/gmail.addons.current.message.metadataGmail add-ons only: view the open message's metadata while the add-on runs.
Not for REST integrationsAdd-on scopesThe add-on scopes work inside a Google Workspace add-on, not for a backend that syncs mailboxes.

Non-sensitive Gmail scopes (3)

gmail.labelshttps://www.googleapis.com/auth/gmail.labelsSee and edit labels, without access to messages. Methods: labels.list, labels.create.
gmail.addons.current.action.composehttps://www.googleapis.com/auth/gmail.addons.current.action.composeGmail add-ons only: manage drafts and send when the user interacts with the add-on.
gmail.addons.current.message.actionhttps://www.googleapis.com/auth/gmail.addons.current.message.actionGmail add-ons only: view the message when the user interacts with the add-on.
Quota costSame for every scopeScopes don't change quota costs. See Gmail API quotas and pricing.

Source: Google's Gmail scopes page and the method reference pages, such as users.watch. Last verified: December 4, 2026.

Use case matrix

Which Gmail API scope do you need?

Start from the feature, then take the narrowest scope that covers it. Each card gives the minimum scope and the level it puts your app in.

Send email, never read the inboxgmail.send

For apps that send on behalf of the user only. Sensitive

Read, search, analyze or back up emailgmail.readonly

Backups and archives don't need mail.google.com. Restricted

Full client, CRM sync or helpdesk (read, send, label)gmail.modify

Covers read, send and labels, without permanent deletion. Restricted

Push notifications with users.watchgmail.readonly or gmail.metadata

Watch only accepts restricted scopes. See Gmail push notifications. Restricted

Route or categorize on headers onlygmail.metadata

Headers and labels, no body or attachments. Restricted

Manage drafts before sendinggmail.compose

Drafts and sending, scoped to composing. Restricted

Import or migrate email into Gmailgmail.insert

Adds messages without sending them. Restricted

Organize labels onlygmail.labels

Labels without message content. Non-sensitive

Delete permanently, bypassing the trashhttps://mail.google.com/

The only reason Google gives to request it. Restricted

Combine scopes only when necessary

You can request several scopes in one OAuth request, such as gmail.send with gmail.labels. Each one adds a line to the consent screen, and one restricted scope is enough to make the whole app restricted.

Least privilege and compliance

The minimum scope principle is also what your privacy policy, GDPR records and SOC 2 controls rely on. Four habits keep them aligned.

Match your policy

Your privacy policy names the Gmail data you access. A scope it doesn't explain is a gap.

Minimize data

Prefer gmail.metadata to gmail.readonly when you never read the body.

Honor revocation

When a user revokes access, stop calls and apply your deletion rules to their data.

Audit each release

Remove scopes no feature uses anymore, and document why each remaining one is needed.

Implementation

How to request Gmail API scopes in your OAuth flow

List the full scope URIs when you build the authorization URL, then read back what the user actually granted. Google lets users approve only part of your request.

gmail-scopes.js
// Ask for the narrowest Gmail OAuth scopes the feature needs
const SEND = 'https://www.googleapis.com/auth/gmail.send';     // sensitive
const LABELS = 'https://www.googleapis.com/auth/gmail.labels'; // non-sensitive

const authUrl = oauth2Client.generateAuthUrl({
  access_type: 'offline',         // refresh token on first consent
  scope: [SEND, LABELS],
  include_granted_scopes: true,  // incremental authorization
  state,                         // CSRF protection
});

// In your callback: check what the user really granted
const { tokens } = await oauth2Client.getToken(code);
const granted = tokens.scope.split(' ');
if (!granted.includes(SEND)) {
  // Partial consent: disable sending and explain why
}

Node.js with the googleapis client. Parameters from Google's OAuth 2.0 for web server applications.

Partial consent Users may grant only some scopes

When you request several scopes, Google's consent screen lets the user untick some of them. Check tokens.scope in Node.js or credentials.granted_scopes in Python, and turn off the features that lost their scope. Apps with domain-wide delegation, or marked as Trusted, get all scopes or none.

Incremental authorization Ask for more scopes in context

Request gmail.send at sign-up, and gmail.readonly only when the user turns on inbox sync. With include_granted_scopes=true, the new token also covers the scopes granted before.

The refresh token comes back only on the first authorization with access_type=offline: see Google OAuth refresh tokens to keep it valid. To try scopes before coding, use the Google OAuth Playground.

Verification

Restricted scope verification: what it means for your app

An app that requests a restricted Gmail scope for external users goes through restricted scope verification before it can leave testing. Four steps, the last one every year.

1
Configure the consent screenApp name, domains, privacy policy and declared scopes. See the Google OAuth consent screen guide.
2
Justify each scopeSubmit for verification and explain why no narrower scope works for each feature.
3
Pass the security assessmentRequired if your servers store or transmit restricted data. It follows the CASA framework of the App Defense Alliance.
4
Revalidate every yearThe assessment is renewed every 12 months to keep access to restricted scopes.

How to keep verification light

  • Send only? gmail.send is sensitive, not restricted: no security assessment.
  • Headers only? gmail.metadata is still restricted, but narrower and easier to justify than gmail.readonly.
  • Still building? In testing mode, only the test users you add can authorize the app: see the Google OAuth 100-user limit.
  • Internal tool? Apps used only inside your own Workspace organization are exempt from verification.

The full credentials and verification walkthrough is in our Google OAuth app verification guide. Sources: Google's security assessment and restricted scope verification pages. Last verified: December 4, 2026.

CASA Tier 2 assessed

Connect Gmail with Unipile's verified Google OAuth app

Unipile has completed Google's verification and a CASA Tier 2 assessment for its own OAuth app, included in the per-account price. Your users connect through Hosted Auth, and you can switch to your own Google credentials at any time. This is not a workaround for Google's security review. See the Email API, used by 6,000+ companies, and start with a 7-day trial.

With Unipile

Gmail API scopes with Unipile

Unipile is an independent technical intermediary: your users grant Gmail scopes once, and your app reads and sends email through one Gmail API integration, on behalf of each authenticated user.

Unipile's Google OAuth app, or yoursUnipile has completed Google's verification and a CASA Tier 2 assessment for its own app, which requests gmail.readonly, gmail.modify, gmail.send and gmail.labels, plus calendar and calendar.events. With your own credentials, your name and logo appear on the consent screen, and the verification is yours.
Scopes per methodThe permissions table lists the scope each endpoint needs. With your own app, you can narrow them for one account with the oauth_scope option of Create Auth Link.
Revoked access, clear signalIf a user revokes access, the account switches to disconnected, a webhook is sent, and a Hosted Auth link reconnects it. Tokens are stored encrypted, in transit and at rest.
GmailGoogle OAuthActive
Use Unipile's keyIncluded in the per-account price, CASA Tier 2Default
gmail.readonlygmail.modifygmail.sendgmail.labelscalendarcalendar.events
Bring your ownYour Client ID, your scopes, your brand on the consent screenOptional
POST https://api.unipile.com/v2/auth/link Hosted Auth

Unipile is not affiliated with, endorsed by, or sponsored by Google; Gmail is a trademark of Google LLC. This is not a workaround for Google's security review. See security and compliance (SOC 2 Type II), the email API guide for Outlook and IMAP, and the Google OAuth documentation.

Gmail API Scopes FAQ

Quick answers on Gmail OAuth scopes, sensitivity levels, verification and scope errors.

They are OAuth 2.0 permission strings, such as https://www.googleapis.com/auth/gmail.readonly, that define what your app can do in a user's Gmail account. Google shows them on the consent screen, and the token the user grants is limited to those actions.

Both are restricted. gmail.readonly can view messages and settings but never send or change anything. gmail.modify can also compose, send, change labels and move messages to the trash, but cannot delete them permanently.

No. Non-sensitive and sensitive scopes never require one. Restricted scopes require restricted scope verification, and a security assessment, renewed every 12 months, when your servers store or transmit the restricted data. Google publishes no price for it.

For full email features: CRM sync, helpdesk tools and email clients that read, send and label messages. It excludes immediate, permanent deletion, which is why Google suggests it over https://mail.google.com/.

Yes. Pass them as a list in the scope parameter, for example gmail.send with gmail.labels. Each scope appears on the consent screen, the most sensitive one sets the verification level, and users may grant only part of the list.

A restricted scope that gives access to labels and headers (sender, recipients, subject, date), never the body or attachments. It suits routing and categorization tools, and it is narrower than gmail.readonly.

gmail.send lets your app send email on behalf of the user, with no read access to the mailbox. It is sensitive, not restricted, so it needs no security assessment. Use it when your app sends but never reads.

The access token does not carry a scope the method needs, for example calling messages.list with only gmail.send, or the user unticked that scope on the consent screen. Check the granted scopes, then request the missing one with incremental authorization. For OAuth errors such as invalid_scope, see our Google OAuth and Gmail API errors guide.

Only if your servers store or transmit the data it gives access to. gmail.readonly is restricted, so restricted scope verification is required for external users either way; the CASA-based security assessment is added when restricted data reaches your servers, and is renewed every 12 months.

By default, users connect through Unipile's Google OAuth app, which has completed Google's verification and a CASA Tier 2 assessment and requests gmail.readonly, gmail.modify, gmail.send, gmail.labels, calendar and calendar.events. You can also use your own Google credentials and choose your scopes. See Unipile's Gmail API.

No. Unipile is not affiliated with, endorsed by, or sponsored by Google. It is an independent technical intermediary that calls the Gmail API on behalf of each authenticated user who granted OAuth consent.

Still have questions? Our team is here to help.

Talk to an expert