Modern Laravel wrapper for the YouTube Data API v3 with OAuth, live streaming, channels, and video uploads.
alchemyguy/youtube-laravel-api is a Laravel package for modern laravel wrapper for the youtube data api v3 with oauth, live streaming, channels, and video uploads..
It currently has 63 GitHub stars and 7.635 downloads on Packagist (latest version v2.0.0).
Install it with composer require alchemyguy/youtube-laravel-api.
Discover more Laravel packages by alchemyguy
or browse all Laravel packages to compare alternatives.
Last updated
Modern Laravel wrapper for the YouTube Data API v3 with OAuth, live broadcast control, channel management, and resumable video uploads.
Documentation: https://alchemyguy.github.io/YoutubeLaravelApi/
composer require alchemyguy/youtube-laravel-api
php artisan vendor:publish --tag=youtube-config
Add credentials to your .env:
YOUTUBE_APP_NAME="My App"
YOUTUBE_CLIENT_ID="your-client-id.apps.googleusercontent.com"
YOUTUBE_CLIENT_SECRET="your-client-secret"
YOUTUBE_API_KEY="your-server-api-key"
YOUTUBE_REDIRECT_URL="https://yourapp.test/oauth/youtube/callback"
use Alchemyguy\YoutubeLaravelApi\Services\AuthenticateService;
use Alchemyguy\YoutubeLaravelApi\Services\LiveStream\LiveStreamService;
use Alchemyguy\YoutubeLaravelApi\DTOs\BroadcastData;
// 1. OAuth
$auth = app(AuthenticateService::class);
$url = $auth->getLoginUrl('[email protected]', 'channel-id');
// ... redirect, handle callback ...
$result = $auth->authenticateWithCode($code);
// 2. Schedule a live broadcast
$live = app(LiveStreamService::class);
$broadcast = $live->broadcast($result['token'], new BroadcastData(
title: 'My Stream',
description: 'Live coding',
scheduledStartTime: new DateTimeImmutable('+10 minutes'),
));
The full guide, API reference, and examples live at alchemyguy.github.io/YoutubeLaravelApi.
If you're on the previous version, see UPGRADE.md — there are several breaking changes.
Contributions welcome — see CONTRIBUTING.md. Please run composer lint and composer test:unit before opening a PR.
If you discover a security vulnerability, please email the maintainer directly rather than opening an issue.
The MIT License (MIT). See LICENSE for details.