Getting started with the YouTube API

Step-by-step guide for posting to YouTube through the Post For Me API

YouTube (Google) Integration Guide

This guide shows you how to configure a Google Developer App to enable YouTube integrations in Post For Me, allowing users to schedule and publish videos to their YouTube channels. Feel free to contact us at postforme@daymoon.dev for any additional support!


Prerequisites

  • A valid Google account
  • A Google Cloud project ready for API usage

1. Enable YouTube Data API

  1. Go to the Google Cloud Console and select your project.
  1. Navigate to APIs & Services → Enable APIs and Services.
  1. Search for YouTube Data API v3 and click Enable.

2. Create OAuth Credentials

  1. Within APIs & Services, open the Credentials tab and click Create Credentials → OAuth client ID.
  1. If prompted, configure the OAuth consent screen (see Section 3).
  1. Choose Web application as the Application type.
  1. Fill in the App name.
  1. Under Authorized redirect URIs, add: https://app.postforme.dev/callback/<project_id>/youtube/account
  • Replace <project_id> with your actual Post For Me project ID or copy the full URL from the configure section
  1. Click Create to generate the credentials.

3. Configure OAuth Consent Screen

  1. Under APIs & Services → OAuth consent screen, configure your OAuth app settings:
  • User type: Select External if Post For Me is used by multiple customers, otherwise Internal for team-only usage.
  • Enter required info such as App name, Support email, Logo, Privacy Policy URL, and Homepage URL.
  1. Add these scopes:
  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtube.upload
  1. If you selected External, add any test-user emails under Test users.
  1. Save and finalize the consent screen.

4. Copy OAuth Credentials to Post For Me

  1. After creation, copy the Client ID and Client Secret from the credentials page.
  1. In Post For Me, go to: Configure -> YouTube
  1. Paste the Client ID and Secret into their respective fields.

5. Connect a YouTube Account

  1. In Post For Me, go to: Project -> Social Media Accounts -> Connect an Account
  1. Choose YouTube.
  1. Follow the Google OAuth flow to connect a channel.

6. Handle Token Expiration (Especially in Testing)

Google limits refresh tokens to 7 days if the OAuth consent screen is in Testing mode. To avoid frequent token expiration:

  • Switch your OAuth consent screen to Production after testing.

7. Manage Quotas (Optional)

YouTube API usage is subject to quota limits:

  1. In the Cloud Console, go to APIs & Services → Enabled APIs & services → YouTube Data API v3.
  1. View your quota usage and request increases if needed (after completing required security audits).

Done!

Your integration is live! YouTube accounts connected via Post For Me are now able to schedule and publish videos seamlessly.