💡

Watch the YouTube Tutorial: https://youtu.be/b8fxx6DqIAw

Follow the instructions as availabe in the Obtaining authorization credentials.

General Setup

Go to Credentials Page

Make sure you are logged in to your Google account and visit the Credentials - APIs & Services page. Make sure to read the terms and conditions and “Agree and Continue”.

Create Project

Create a new project by clicking on the “Create Project” button. Fill in the project name, and details and click “Create”.

Create OAuth Credentials

Create credentials by clicking on the “Create Credentials” button. Select the “OAuth client ID” option.

Make sure that your consent screen has been configured.

Fill in OAuth Details

Create the OAuth client ID. Select “Web application” as the application type and fill in the details.


The OAuth2 Redirect URI is the location where the provider will redirect to after trying to login. This needs to set to your Postiz FRONTEND_URL + /integrations/social/ + youtube.

  • eg: If you are running on a container, and your Postiz URL is: https://postiz.example.com, then your OAuth2 Redirect URI is https://postiz.example.com/integrations/social/youtube
  • eg: If you are running on localhost, and your Postiz URL is http://localhost:4200, then your OAuth2 Redirect URI is http://localhost:4200/integrations/social/youtube
  • eg: If you are running on localhost, and the provider doesn't accept http uris, and your Postiz URL is http://localhost:4200, then your OAuth2 Redirect URI is https://redirectmeto.com/http://localhost:4200/integrations/social/youtube

You only need to set one OAuth2 Redirect URI when you are setting up your Postiz app.

Under “Authorized redirect URIs”, insert your OAuth2 Redirect URI.

YouTube

After following all of the steps above you should be met with a screen that shows your client ID and client secret. Add these to your providers configuration.

YOUTUBE_CLIENT_ID=""
YOUTUBE_CLIENT_SECRET=""

Add Test User

Add yourself as a test user of the application

YouTube

Activate YouTube’s API

Go to “Enabled APIs and Services”. Then click on “Enable APIs and Services”. Search “YouTube Data API v3” and activate the API by selecting it and clicking “Enable”. Do the same Process with “YouTube Analytics API” and “YouTube Reporting API”.

Enabled APIs

Enabled APIs

ADDITIONAL STEPS FOR BRAND ACCOUNTS

Note: When using a Brand account you will need to set your APP to External and setup a test user. You do not need to publish the APP, but it does take time for the changes to propagate. You will also need to add the app to the trusted apps within your google workspace Admin.

Go to admin.google.com

Sign in

Go to Security —> Access and data Controls —> API Controls

Click Manage Third Party App Access

Click “Configure new App”

Put your Client ID for the app you created in previous steps into the search box and select your app

Set scopes and Google Data Access for the app to Trusted

Once set, click save

Wait at least 5 hours for the changes to propagate.

After this time you should now be able to add your Youtube channel to your Postiz account