Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 742 Bytes

api-keys.md

File metadata and controls

13 lines (8 loc) · 742 Bytes

API Keys

When calling APIs that do not access private user data, you can use simple API keys. These keys are used to authenticate your application for accounting purposes. The Google Developers Console documentation also describes API keys.

Note: If you do need to access private user data, you must use OAuth 2.0. See Using OAuth 2.0 for Web Server Applications and Using OAuth 2.0 for Server to Server Applications for more information.

Using API Keys

To use API keys, call the setDeveloperKey() method of the Google\Client object before making any API calls. For example:

$client->setDeveloperKey($api_key);