PHPackages                             sahusoftcom/youtube-livestream-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. sahusoftcom/youtube-livestream-api

ActiveLibrary[API Development](/categories/api)

sahusoftcom/youtube-livestream-api
==================================

PHP (Laravel) Package for Google / YouTube API of Video Live Streaming with Google Auth

v2.0.0(7y ago)451.1k16[3 issues](https://github.com/sahusoftcom/youtube-livestream-api/issues)MITPHPPHP &gt;=5.5.9CI failing

Since Oct 6Pushed 7y ago10 watchersCompare

[ Source](https://github.com/sahusoftcom/youtube-livestream-api)[ Packagist](https://packagist.org/packages/sahusoftcom/youtube-livestream-api)[ Docs](https://github.com/sahusoftcom/youtube-livestream-api)[ RSS](/packages/sahusoftcom-youtube-livestream-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

sahusoftcom/youtube-livestream-api:
===================================

[](#sahusoftcomyoutube-livestream-api)

PHP (Laravel) Package for Google / YouTube API of Video Live Streaming with Google Auth

Installation :
--------------

[](#installation-)

```
composer require sahusoftcom/youtube-livestream-api
```

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

```
SahusoftCom\YoutubeApi\LiveStreamApiServiceProvider::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`(redirect\_url)
9. You will get values (to be exact - client\_id, client\_secret, api\_key, redirect\_url)
10. Now add these values - client\_id, client\_secret, api\_key and redirect\_url in the env file.

Setting Up the App:
-------------------

[](#setting-up-the-app)

#### Authentication and Authorization:

[](#authentication-and-authorization)

```
