This document describes API Keys, when to use them, how to acquire them, and how to use them with the Google API Client Library for .NET.
Introduction
When calling an API that does not access private user data, you can use a simple API key. This key is used to authenticate your application for accounting purposes. You can read more on API keys in the Console documentation.
Note: If you do need to access private user data, you must use OAuth 2.0.
Acquiring API keys
- Open the Credentials page in the API Console.
- Click Create credentials > API key and select the appropriate key type.
To keep your API keys secure, follow the best practices for securely using API keys.
Using API keys
To use an API key, pass it to the
BaseClientService.Initializer APIKey
property. The
Simple API Example
on the Get Started page provides a complete example that uses API keys.
By setting the APIKey
property, you ensure that every call you make
to the service will include the API key.