欢迎 What's new in Chrome extensions Get help with Chrome extensions API reference Samples
欢迎 What's new in Chrome extensions Get help with Chrome extensions API reference Samples

Manifest - oauth2

Published on

An optional manifest key enabling the use of an OAuth 2.0 security ID on the extension. This key takes an object with two required sub-properties: "client_id" and "scopes". When developing an extension that uses an "oauth2" key, consider also setting the extension's "key" to keep a consistent extension ID.

For more detailed implementation instructions, visit the full OAuth 2.0 tutorial.

{
// ...
"oauth2": {
"client_id": "YOUR_EXTENSION_OAUTH_CLIENT_ID.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]
},
"key": "EXTENSION_PUBLIC_KEY",
// ...
}

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.