G user
G user

Reputation: 21

Where to find google suite api key?

I've just created a g suite free trial, and am trying to work with the Calendar API's. I've turned on "Enable API access" under API references from within the admin console.

I'm looking through the api documentation and am able to hit some example API calls using their in-browser "Try this API" function. Though, when I look at the HTML code, I'm given a URL that looks like this;

GET https://www.googleapis.com/admin/directory/v1/customer/my_customer/resources/buildings?key=[YOUR_API_KEY] HTTP/1.1

Where do I find this API key? I can't find it in the admin console anywhere. Was this generated when I enabled API access? Is Google injecting it in when I hit the "Execute" button on "Try this API"? Also, where can I find my unique ID for my g suite account so I don't have to use "my_customer"?

Upvotes: 2

Views: 1190

Answers (1)

Axel
Axel

Reputation: 98

The API Key is one of the options that you have to generate OAuth credentials. To get an API key you need to create a project at https://console.developers.google.com/ - Once the Project is created get sure to select it from the upper left drop-down menu. - Go to "Library" from the left side and search for the API that you want to work with(Drive API, Admin SDK, Calendar API, etc.) and enable it. - You can now generate the API, from the left side menu go to "Credentials". Select "Create Credentials". The first option will be API key.

Upvotes: 1

Related Questions