Prepare for a YouTube Connection (Beta)
Prepare to set up your YouTube channels connection with Data Cloud.
The instructions in this article assist you to gather this information that are required to create a connection to the YouTube connector and to successfully ingest video content. If you have any of the following information or have already done any of the steps you may skip them.
- YouTube Channel ID (from YouTube)
- A published YouTube Project for (from Google)
- OAuth Client ID (from Google)
- OAuth Client Secret (from Google)
- A Google API OAuth Refresh Token (from Google)
Only public videos located in the channels you own can be ingested. If you want to ingest someone else’s videos, co-own their channel or have them create the connector for you. If you want to include a private video, change its tag to Public.
This procedure allows you to access your YouTube Channel ID. If you already have the ID, skip this step.
Before you begin: Verify you're the owner of the YouTube channel you want to ingest videos from. If you aren't the owner, ask the owner to perform these steps and send you the ID.
To get your YouTube Channel ID:
- Go to your YouTube account and sign in.
- Select your user avatar in the top right corner.
- From the dropdown, select Settings.
- From the Settings menu on the left, select Advanced Settings.
- In the Advanced settings screen, find the Channel ID field, and select Copy.
Save this information as you will need it later. The ID is similar to:
UCklnwi5PqVorRrIt7UNpmWQ
.
If you already have a YouTube project, skip to Step 2. If not, follow the instructions in Google's documentation. Remember to publish the project to production and proceed to step 2.
- From your browser, go to the Google Cloud Console.
- Select a YouTube project such as the project you created in Step 1.
- In the APIs and Services menu, select Credentials.
- Select Create Credentials.
- From the dropdown menu that opens, select OAuth client ID.
- From the Application dropdown, select Web application.
- Fill in the Name field with a name for the Client ID.
- Under Authorized redirect URIs, select Add URI.
- In the URIs field, enter: https://developers.google.com/oauthplayground
- Select Create.
- A popup opens. In the popup, you can see the generated Client ID and Client Secret. Copy the Client ID and Client Secret to a safe location as you will need it later. After you close the popup you can retrieve the Client ID and Secret by clicking the Credentials menu.
- Close the popup. Proceed to the next section to get a refresh token.
In this procedure you will be able to create a refresh token for the YouTube connector. This action prevents the connector authentication token from expiring.
Before you begin: Make sure you have your YouTube Client ID and Client Secret.
- From a browser, go to: OAuth 2.0 Playground.
- Select Settings.
- Check the Use your own OAuth credentials checkbox.
- Enter the following information
- OAuth Client ID – Enter the Client ID you copied on Step 2.
- OAuth Client Secret – Enter the Client Secret you copied on Step 2.
- Select Close.
- In the left panel, expand Step 1 Select & authorize APIs.
- Expand YouTube Data API v3 v3 and select https://www.googleapis.com/auth/youtube.force-ssl
- Select Authorize APIs.
- Select your account and select Allow Access. You will get an authorization code. Copy this code. You need it for the next step.
- Expand Step 2 Exchange authorization code for tokens.
- In the Authorization Code field, paste the authorization code you copied above.
- Select Exchange authorization code for tokens.
- Check the Auto-refresh token before it expires checkbox. If you don't check this checkbox and your token expires, your connector will fail, and you will have to regenerate the refresh token.
- Your Refresh token appears in the Refresh token field. Copy this information and save it in a safe location. You will need this later.
- Continue to the next section: Add labels to YouTube Content.
Add tags to your YouTube videos as described in YouTube Help. When your YouTube content is uploaded, the tags that you use for the videos are included. You can use these tags to filter which videos are uploaded to Data Cloud. Suppose you want to upload only videos on a specific topic. In this case, create a tag for that subject and add it to all applicable videos. When the connector runs, if you have selected the custom tag as a filter, you can include or exclude all videos that are using the tag.
For example, your YouTube channel contains videos that are for both Enterprise and Public customers. If you create a custom tag called Enterprise and apply it to your Enterprise video content, you'll be able to explicitly include or exclude the Enterprise content by listing the tag in the connector set up. At runtime, the Enterprise videos tagged with the Enterprise tag will be included or excluded depending on how you set up the connector.
If you have YouTube playlists, you can use the name of the playlist to select the videos located in the playlist. See YouTube Help for instructions on managing playlists. Collect a list of playlists that contain videos you want to ingest.
Next Step: Set Up a YouTube Connection