FireDAC Components for YouTube Analytics

Build 22.0.8462

Creating a Custom OAuth App

You can use a custom OAuth app to authenticate a service account or a user account. See Using OAuth Authentication for more information.

Create an OAuth App for User Account Authentication

Follow the procedure below to register an app and obtain the OAuthClientId and OAuthClientSecret.

Create a Custom OAuth App: Desktop

  1. Log into the Google API Console and open a project. Select the API Manager from the main menu.
  2. In the user consent flow, click Credentials -> Create Credentials -> OAuth Client Id. Click Other. After creating the app, the OAuthClientId and OAuthClientSecret are displayed.

  3. Click Library -> YouTube Analytics API -> Enable API.

Create a Custom OAuth App: Web Apps

  1. Log into the Google API Console and open a project. Select the API Manager from the main menu.
  2. Click Credentials -> Create Credentials -> OAuth Client Id -> Web Application. In the Authorized Redirect URIs box, enter the URL you want to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. After creating the app, the OAuthClientId and OAuthClientSecret are displayed.
  3. Click Library -> YouTube Analytics API -> Enable API.

Create a Custom OAuth App: Headless Machines

Follow the procedure below to register an app and obtain the OAuth client credentials.

  1. Log into the Google API Console and open a project. Select the API Manager from the main menu.
  2. Click Credentials -> Create Credentials -> OAuth Client Id. From the dropdown, select "Desktop app". Name the app and click Create. After creating the app, the OAuthClientId and OAuthClientSecret are displayed.
  3. Click Library -> YouTube Analytics API -> Enable API.

Create an OAuth App for Service Account Authentication

Follow the steps below to create an OAuth application and generate a private key. You will then authorize the service account.

  1. Log into the Google API Console and open a project. Select the API Manager from the main menu.
  2. Click Create Credentials -> Service Account Key.
  3. In the Service Account menu, select New Service Account or select an existing service account.
  4. If you are creating a new service account, additionally select one or more roles. You can assign primitive roles at the project level in the IAM and Admin section; other roles enable you to further customize access to Google APIs.
  5. In the Key Type section, select the P12 key type.
  6. Create the app to download the key pair. The private key's password is displayed: Set this in OAuthJWTCertPassword.
  7. In the service accounts section, click Manage Service Accounts and set OAuthJWTIssuer to the email address displayed in the service account Id field.
  8. Click Library -> YouTube Analytics API -> Enable API.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462