- Clone this repository
- Install dependencies via
composer install
- Run
php vendor/bin/homestead make
- Run
vagrant up
- When the box is ready log in to the box via
vagrant ssh
- Inside the box navigate to
/home/vagrant/code
- Run
cp .env.example .env
- Run
php artisan key:generate
- Run
php artisan migrate
- Go to https://console.developers.google.com/ and create a project
- Inside the project activate the "YouTube Data API v3"
- Create an OAuth-Approval-Screen
- Add the
.../auth/youtube.readonly
section - Add your email address as a trusted user
- Add the
- Create an API key
- Save the token to the
.env
file asYOUTUBE_API_KEY
(at the bottom of the file)
- Save the token to the
- Create an OAuth 2.0 client
- Type: web application
- Name: "YouTube Feed Exporter" (e.g.)
- Authorised redirect uris:
http://localhost:8000/oauth/youtube/handle
- Save the client id to the
.env
file asYOUTUBE_CLIENT_ID
(at the bottom of the file) - Save the client secret to the
.env
file asYOUTUBE_CLIENT_SECRET
(at the bottom of the file)
Navigate to http://localhost:8000/. You'll get redirected to YouTube/Google to authenticate and authorize the app/client you just created. When you're done, you'll get redirected back to http://localhost:8000/ and get your subscriptions as JSON.