Creating a YouTube Music App


To start collecting social sign ups and listening activity from YouTube Music, you need to get your YouTube Music app up and running. YouTube Music uses Google sign in, so you create the app in the Google Cloud console and then add its credentials to your AE dashboard.



Create Your App on Google


  1. Go to the Google Cloud console and sign in. Create a new project, or choose an existing one.
  2. Open the API library, search for YouTube Data API v3 and click Enable.
  3. Set up the OAuth consent screen. Choose External as the user type, then fill in your brand and company details, including your app name, support email and a link to your public privacy policy. Save.
  4. Go to Credentials, click Create credentials and choose OAuth client ID. For the application type, choose Web application.
  5. Under Authorized JavaScript origins, add the address your AE Connect framework loads from: https://YOUR-AE-CONNECT-ADDRESS. AE does not rely on this setting, but it does no harm to fill it in.
  6. Under Authorized redirect URIs, add: https://YOUR-AE-CONNECT-ADDRESS/YouTubeMusicAuthenticator_Controller
  7. Click Create. A pop-up shows your client ID and client secret. Copy both.
  8. Optional, but recommended: go back to Credentials, click Create credentials and choose API key. Restrict the key to YouTube Data API v3, then copy it. You will paste it in the Data API key field in your dashboard.


Important

Replace YOUR-AE-CONNECT-ADDRESS with the address your AE Connect framework loads from: the domain in the script address on the Install AE Connect tab of your application. For example, for the demo dashboard it is demo.theappreciationengine.com.


What is the Data API key for?

AE uses the key to look up channel IDs for your brand's YouTube channels. If you leave the field empty, AE uses its own key, which is limited to 100 lookups a day shared across customers. Adding your own key avoids that limit. The same field appears for YouTube.


Already created a YouTube app?

YouTube and YouTube Music are separate services in AE Connect, each with its own redirect address. You can add the YouTube Music redirect URI to the Google OAuth client you already use for YouTube (see Creating a YouTube App) and paste the same client ID and client secret into YouTube Music.




Setup Your YouTube Music App in Your Dashboard


  1. Go back to your AE dashboard. Open the Manage page of the application you want to configure, then click the Social Apps tab.
  2. In the Connect Your Social Apps section, under Streaming, click the YouTube Music icon.
  3. On the Basic settings tab, paste your client ID and client secret.
  4. Optional, but recommended: paste your API key in the Data API key field.
  5. Optional: click the Advanced settings tab to review the permissions AE requests. By default AE asks for https://www.googleapis.com/auth/youtube.readonly, https://www.googleapis.com/auth/userinfo.email and https://www.googleapis.com/auth/userinfo.profile. Add more permissions one at a time if you need them.
  6. Press Update app (or Activate app the first time). The YouTube Music icon now shows that the app is live.


Using YouTube Music pre-saves?

Pre-saves need permission to add to a member's library. Add https://www.googleapis.com/auth/youtube.force-ssl on the Advanced settings tab. AE does not request it by default. See Create a Spotify or YouTube Music Pre-save Campaign.




Get Your App Verified


Google reviews apps that ask members for access to their YouTube data. Until your app is verified, only test users you add in the Google Cloud console can sign in, and other members see a warning screen. We recommend you submit your app for verification before you go live. You will need to verify your domain and have a public privacy policy.



What AE Tracks


Once a member signs in with YouTube Music, AE can track playlist additions, liked tracks and followed channels. To match activity to your brand, add your YouTube channel to the brand: open your brand, find YouTube channel under Streaming Pages, and enter the channel address, for example https://www.youtube.com/user/BrandName.


Connect other social networks: Creating a YouTube App, Creating a Spotify App, Creating a Discord app.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article