PHPackages                             trunks07/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. [API Development](/categories/api)
4. /
5. trunks07/youtube-laravel-api

ActiveLibrary[API Development](/categories/api)

trunks07/youtube-laravel-api
============================

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

11.3kPHP

Since Dec 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/trunks07/YoutubeLaravelApi)[ Packagist](https://packagist.org/packages/trunks07/youtube-laravel-api)[ RSS](/packages/trunks07-youtube-laravel-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)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 trunks07/youtube-laravel-api
```

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

```
trunks07\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**

```
