PHPackages                             marcusyan/youtube-laravel-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. marcusyan/youtube-laravel-api

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

marcusyan/youtube-laravel-api
=============================

It is a wrapper over Youtube Api v3 which simplifies functionalities the laravel way.

v1.0.0.2(8y ago)01.1kMITPHPPHP ~5.6|~7.0

Since Feb 19Pushed 2y agoCompare

[ Source](https://github.com/Marcusyan/YoutubeLaravelApi)[ Packagist](https://packagist.org/packages/marcusyan/youtube-laravel-api)[ Docs](https://github.com/alchemyguy/YoutubeLaravelApi)[ RSS](/packages/marcusyan-youtube-laravel-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Youtube Laravel Api
===================

[](#youtube-laravel-api)

`PHP (Laravel) Package for Google / YouTube API V3 with Google Auth`

Features
--------

[](#features)

- [Google Auth](#google-auth)
- [Full Live Streaming API for Youtube](#full-live-streaming-api)
- [Full Youtube Channel API](#full-youtube-channel-api)
- [Full Youtube Video API](#full-youtube-video-api)

Installation
------------

[](#installation)

```
composer require alchemyguy/youtube-laravel-api
```

Add Service provider to config/app.php provider's array:

```
alchemyguy\YoutubeLaravelApi\YoutubeLaravelApiServiceProvider::class
```

Execute the following command to get the configurations:

```
php artisan vendor:publish --tag='youtube-config'
```

Steps to create your google oauth credentials:
----------------------------------------------

[](#steps-to-create-your-google-oauth-credentials)

1. Goto `https://console.developers.google.com`
2. Login with your credentials &amp; then create a new project.
3. Enable the following features while creating key
    - Youtube Data API
    - Youtube Analytics API
    - Youtube Reporting API
4. Then create `API key` from credentials tab.
5. Then in OAuth Consent Screen enter the `product name`(your site name).
6. create credentials &gt; select OAuth Client ID. (here you will get client\_id and client\_secret)
7. Then in the Authorized Javascript Origins section add `you site url`.
8. In the Authorized Redirect URLs section add `add a url which you want the auth code to return`(login callback)
9. You will get values (to be exact - client\_id, client\_secret &amp; api\_key)
10. Then add these values - client\_id, client\_secret, api\_key and redirect\_url in the env file and you can start using the package now.

Usage :
-------

[](#usage-)

### Google Auth

[](#google-auth)

- **Add Code to call the api class**

```
