Your application must have authorization credentials to be able to use the YouTube Data API.
This document describes the different types of authorization credentials that the
Google API Console
supports. It also explains how to find or create authorization credentials for your project.
Create your project and select API services
- Open the
Credentials page
in the API Console.
-
This API supports two types of credentials.
Create whichever credentials are appropriate for your project:
-
OAuth 2.0:
Whenever your application requests private user
data, it must send an OAuth 2.0 token along with the request. Your
application first sends a client ID and, possibly, a client secret to
obtain a token. You can generate OAuth 2.0 credentials for web
applications, service accounts, or installed applications.
For more information, see the
OAuth 2.0 documentation
.
-
API keys:
A request that does not provide an OAuth 2.0 token must send an API
key.
The key identifies your project and provides API access, quota, and
reports.
The API supports several types of restrictions on API keys. If the API key that you
need doesn't already exist, then create an API key in the Console by
clicking
Create credentials
> API key
. You can restrict the key before using it
in production by clicking
Restrict key
and selecting one of the
Restrictions
.
To keep your API keys secure, follow the
best practices for
securely using API keys
.