The CDATA connections in Infoworks allow users to connect to various sources, one such is Youtube Analytics. Connecting to Youtube Analytics to fetch the data requires OAuth authentication. The auth mechanism should be set in such a way that refresh of access token is done automatically. Please follow the below steps for the same. 


  1. Set the JDBC URL as


  2. Add the email id of the youtube user as the username, Set the password to *.

  3. Please enable  Youtube Analytics API & Youtube Data API v3 from the following page
  4. Obtain the Oauth2 credentials, client id, and client secret, from this page. If there are no credentials in the OAuth client id section, you can create one using "create credentials". (while creating credentials please add the redirect URI as: )
  5. Perform the following steps to obtain the OAuth refresh token and access token. 

    1. Visit: 

    2. Fill the client id and secret obtained from step 4 in the highlighted fields under settings
    3. In the select & authorize APIs section select under YouTube Analytics API v2 and click on authorize APIs.

    4. Now click on the exchange authorization code for tokens.

    5. Now in the right pane of the page, you will have the access token and the refresh token in the following format:

    6. {
        "access_token": "ya29.a0ARrdaM_XgrvIg65QYjlcpWCGCIzSzxE_DywzwcIu0VZbIJ5qPr-ljS59bD8E3Fmej0FQWhOheeoBri5-XBZw9PHTbNrCCfG5I5r4n3kL_mbVdGsvoh_l0yZaPZ5m14KWNGg6Ura2s4vNLMGrG_BRjsNg807l", 
        "scope": "", 
        "token_type": "Bearer", 
        "expires_in": 3599, 
        "refresh_token": "1//04NwjjLHBJzAbCgYIARAAGAQSNwF-L9Ird1co4iKPsVWY6H1B-qaH9Z2WBZXZH6YwPYRmvzz-5gHdZlPT0GAGLVQErg5y1pwxSQg"

  6. Now in the Infoworks UI pass the following as the additional connection parameters (Format specified here : KEY: VALUE)

    OAuthRefreshToken: your-access-token

    OAuthClientId: your-client-id

    OAuthClientSecret: your-client-secret

    InitiateOAuth: GETANDREFRESH

    OAuthRefreshToken: your-refresh-token