O'Reilly logo

Programming Chrome Apps by Marc Rochkind

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Registering Chrome Apps with Google

Before a Chrome App can access Google APIs, you must register it with Google. Registration is documented by Google (read the “User Authentication” section), but as of October 2014, the Google Developers Console user interface has been updated, and the step-by-step instructions are out whack with what the website does. What follows here works as of this writing, but be warned that it might change again by the time you read it.

Registering a Chrome App and Getting a Client ID

To register your Chrome App and obtain a client ID, you need to do the following:

  1. Go to the Google Developers Console.
  2. Click the Create Project button. In the New Project window that opens, type the project name and then click the Create button, as shown in Figure B-1.
Creating a new project
Figure B-1. Creating a new project
  1. In the Developers Console, in the “APIs & auth” section, click APIs and turn on any APIs your app needs. For the example in Accessing Google APIs, this would be Drive API, as shown in Figure B-2. (A few others are also enabled by default.)
Enabling the Drive API
Figure B-2. Enabling the Drive API
  1. Again, in the “APIs & auth” section, click Credentials and then click CREATE NEW CLIENT ID under OAuth. In the dialog box that opens, click the “Installed application” radio button and then Chrome ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required