Skip to main content
MagicPost uploads to YouTube with the YouTube Data API. You create one Google Cloud project and OAuth client. Each user then connects their own YouTube channel through it.

What you need

  • A Google account that can use the Google Cloud console.
  • Your site served over HTTPS.
  • Access to Admin → Publishing → Platforms.
  • For a custom thumbnail, FFmpeg on the server. See Video processing.

Set up Google Cloud

1

Create a project and enable the API

In the Google Cloud console, create a project and enable the YouTube Data API v3 for it.
2

Get the redirect URI from MagicPost

In MagicPost, go to Admin → Publishing → Platforms and click Add credentials on the YouTube card. Under What to register, copy the Redirect URI and the permissions under Permissions asked for:
3

Configure the consent screen

Set up the OAuth consent screen for External users and add the scopes from the table below.
4

Create the OAuth client

Create an OAuth client ID of type Web application. Add the redirect URI under Authorized redirect URIs.
5

Copy the keys

Copy the Client ID and the Client secret.
6

Store them in MagicPost

Paste them into Client ID and Client secret. Tick Available to users, click Save, then Run checks.

Permissions MagicPost asks for

While the consent screen is in Testing, Google ends every connection after 7 days. Publish the app to In production before users rely on it.
Videos uploaded through a Google project that has not passed YouTube’s API audit are locked to private, whatever visibility the user chose. Request the audit from Google before people publish publicly.

Connect a YouTube channel

1

Open Channels

Under Publishing in the sidebar, click Channels.
2

Add the channel

In Add a channel, click YouTube. Sign in with Google and approve access. Google asks for consent every time, so that it issues a refresh token.
3

Confirm

You return to Channels with a Channel entry named after the YouTube channel.
A Google account without a YouTube channel cannot be connected. MagicPost answers This Google account has no YouTube channel. Channels connected before first comments were added lack the youtube.force-ssl scope. They have to reconnect to get first comments.

What you can publish

YouTube has two post types: Video and Short. Both need a video.
  • YouTube counts the description in bytes, so characters outside the basic Latin range use more than one.
  • Files reach YouTube through the media library. Its default ceiling is 2,048 MB per video, and it accepts mp4, mov, webm, avi and mkv. A larger file, or a format the library does not accept such as flv, cannot be added to the library. See Upload ceilings.
  • A Short needs a square or vertical video. A wide one is published as a regular video.
  • YouTube refuses videos over 15 minutes until the YouTube account is verified.

Options

Set these under Settings for the channel in the composer.
  • MagicPost switches Altered or synthetic content on by itself when any attached media was created with MagicPost’s AI tools.
  • Thumbnail frame only works for a verified YouTube account, and the server needs FFmpeg. Otherwise YouTube picks a thumbnail itself. The video stays live either way.

First comment

The first comment is posted as a top-level comment on the video once YouTube has finished processing it. It is not posted on a video marked Made for kids, because comments are off. If posting it fails, the video stays published and the failure is written to the application log.

How the upload works

  • The file is uploaded in chunks of 8 MB against one upload session. A run that is cut short asks Google how much it has and carries on, so a long video is never sent twice.
  • After the upload, MagicPost waits for YouTube to process the video and checks again every minute. A video that is still processing 30 minutes after the upload is treated as published, because it exists and YouTube carries on.

Connection check

The same note about private uploads appears in the composer under Settings for the channel.

Analytics

See Analytics.

Common errors

The Google project’s daily quota is used up. The post is retried after midnight Pacific time, when the allowance resets.
The channel itself hit YouTube’s limit. The post goes out after midnight Pacific time.
The Google project has not passed YouTube’s API audit. See the warning above and apply for the audit.
The OAuth consent screen is still in Testing. Publish it to In production, then reconnect the channels.
The channel already holds a video with the same content. Use a different file.
Verify the YouTube account to upload videos over 15 minutes.
Export the video as an H.264 MP4 and try again.
MagicPost starts the upload again automatically. No action is needed.
The URI under Authorized redirect URIs in Google Cloud differs from the Redirect URI in MagicPost. Copy it again from the setup panel.
Other errors are shown with Google’s own message. See Failed posts.