Setting up a Google API service account

March 8, 2015 ยท View on GitHub

  1. Go to the Google API Console.

  2. Click on Create Project.

screen shot 2015-03-07 at 11 14 42 pm

  1. Specify a project name and id, and click Create.

screen shot 2015-03-07 at 11 14 53 pm

  1. On the dashboard, click Credentials under APIs & auth

screen shot 2015-03-07 at 11 15 22 pm

  1. Click Create new Client ID.

screen shot 2015-03-07 at 11 15 27 pm

  1. Select Service Account, and click Create Client ID.

screen shot 2015-03-07 at 11 15 36 pm

  1. Remember the displayed private key password, and click Okay, got it. A .p12 file will also be downloaded, so make sure you can locate it.

screen shot 2015-03-07 at 11 15 47 pm

  1. Save the email address belonging to the the Client ID.

screen shot 2015-03-07 at 11 15 51 pm

  1. Open up your favorite terminal app, and navigate to the directory in which the .p12 file was downloaded. Then execute the following command, replacing P12_FILE_NAME with the name of your .p12 file.

openssl pkcs12 -in P12_FILE_NAME.p12 -out key.pem -nodes

You'll need to enter the private key password as shown in step 7.

screen shot 2015-03-07 at 11 20 04 pm

  1. Verify that a key.pem file was created. This, along with the email address from step 8, is all you need to create access tokens for this account.