API Keys
Stay organized with collections
Save and categorize content based on your preferences.
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.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["API keys are used for authenticating applications when accessing public data, not private user data."],["You can create and manage API keys through the Credentials page in the Google API Console."],["To use an API key with the Google API Client Library for .NET, set the `APIKey` property within the `BaseClientService.Initializer`."],["Securely store and manage your API keys by adhering to Google's best practices."]]],[]]