You need to register your application with Google to be able to use the YouTube Data API. The following steps explain how to register your application and then find its authorization credentials in the Google Cloud Console.
Create your project and select API services
To register a new application, do the following:
- Go to the Google Cloud Console.
- Select a project, or create a new one.
- In the sidebar on the left, select APIs & auth. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
- In the sidebar on the left, select Registered apps.
- At the top of the page, select Register App.
- Fill out the form and select Register.
-
YouTube Data API requests must specify an API key or an OAuth 2.0 token.
-
API keys: The Browser Key and Server Key sections show your application's API keys. Use the Browser Key in a browser-based application that accesses public data, and use the Server Key in a server application that accesses public data.
-
OAuth 2.0 token: Expand the OAuth 2.0 Client ID section to find your application's client ID and client secret or to set a redirect URI. Your application must send an OAuth 2.0 token with any YouTube Data API request that accesses private user data.
-
Find authorization credentials for a project
To find the authorization credentials for an existing project, follow these steps:
- Go to the Google Cloud Console.
- Select a project.
- In the sidebar on the left, select APIs & auth.
- In the sidebar on the left, select Registered apps.
- Select an application to view its authorization credentials.
YouTube Data API requests must specify an API key or an OAuth 2.0 token.
-
API keys: The Browser Key and Server Key sections show your application's API keys. Use the Browser Key in a browser-based application that accesses public data, and use the Server Key in a server application that accesses public data.
-
OAuth 2.0 token: Expand the OAuth 2.0 Client ID section to find your application's client ID and client secret or to set a redirect URI. Your application must send an OAuth 2.0 token with any YouTube Data API request that accesses private user data.
-