This is a sample Google Chrome extension that demonstrates using the Chrome Identity API to authorize access to the Gmail and Google+ APIs. It is a quick start to the Chrome User Authentication documentation.
The quick and easy to get the code running on your computer.
- Download the source code.
- Load the extension in developer mode.
- Authorize extension.
Getting the code working for your extension is a little more work since this sample comes preloaded with an existing Chrome extension id and Google APIs client details.
- Have a Chrome extension published with
identity
permission. It can be a private extension that does nothing. - Install extension from the CWS and get the
key
. Adding this to your unpacked extension source makes the development ID match what the Google APIs app expects. - Register Google APIs client and enable the Google APIs you plan on using.
- Set the API client details in the manifest.
- Authorize extension.
- The URLs of the Google APIs you will be using must be whitelisted in the manifest.
Google product names and logos are owned by Google.