Click here to see your recently viewed pages and most viewed pages.
Hide

Obtaining authorization credentials

Your application must have authorization credentials to be able to use the YouTube Analytics API. This document describes the different types of authorization credentials that the Google Developers Console supports. It also explains how to find or create authorization credentials for your project.

Create your project and select API services

  1. Go to the Google Developers Console.
  2. Select a project.
  3. In the sidebar on the left, select APIs & auth. In the list of APIs, make sure the status is ON for the YouTube Analytics API.
  4. In the sidebar on the left, select Credentials.
  5. The page allows you to create two different types of credentials. However, all of the methods for the YouTube Analytics API require OAuth 2.0 authorization. Follow the instructions below to generate OAuth 2.0 credentials.
    • OAuth 2.0: Your application must send an OAuth 2.0 token with any request that accesses private user data. Your application 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.

    • API keys: You have the option of including an API key with a request. The key identifies your project and provides API access, quota, and reports.

      Note that all of the methods for the YouTube Analytics API require OAuth 2.0 authorization. For that reason, you need to follow the instructions above for generating OAuth 2.0 credentials. If you want, you can also send an API key, but it is not necessary.