Using OAuth Authentication
Use the OAuth authentication standard to connect to YouTube Analytics. You can authenticate with a user account or a service account. The connector facilitates this as described below.
Using a User Account to Authenticate to YouTube Analytics
The user account flow requires the authenticating user to interact with YouTube Analytics via the browser.
Desktop ApplicationsSee Embedded Credentials to connect with the connector's embedded credentials and skip creating a custom OAuth app.
Headless MachinesSee Headless Machines to skip creating a custom OAuth app and authenticate an application running on a headless server or another machine where the connector is not authorized to open a browser.
Instead of connecting with the connector's embedded credentials, you can register an app to obtain the OAuthClientId and OAuthClientSecret.
When to Create a Custom OAuth App
Creating a custom OAuth app is optional as the connector is already registered with YouTube Analytics and you can connect with its embedded credentials. You might want to create a custom OAuth app to change the information displayed when users log into the YouTube Analytics OAuth endpoint to grant permissions to the connector.
Creating a custom OAuth app is optional to authenticate a headless machine; the connector is already registered with YouTube Analytics and you can connect with its embedded credentials. In the headless OAuth flow, users need to authenticate via a browser on another machine. You might want to create a custom OAuth app to change the information displayed when users log into the YouTube Analytics OAuth endpoint to grant permissions to the connector.
Using a Service Account to Connect to YouTube Analytics
Service accounts have silent authentication, without user authentication in the browser. You can also use a service account to delegate enterprise-wide access scopes to the connector.
You need to create an OAuth application in this flow. You can then connect to YouTube Analytics data that the service account has permission to access. See Custom Credentials for an authentication guide.
Creating a Custom OAuth App
See Creating a Custom OAuth App for a procedure.