how to upload video to youtube with php api v3 this code sample help you to upload videos to your youtube channel quickly. you can run this code even with localhost. 1) create auth2 credentials go to https://console.developers.google.com/apis/dashboard and create auth 2 credentials as below steps now you have auth 2 client ID and auth 2 client secret. then the last step ... create php script to upload videos <?php if (!file_exists(__DIR__ . '/vendor/autoload.php')) { throw new \Exception('please run "composer require google/apiclient:~2.0" in "' . __DIR__ .'"'); } require_once __DIR__ . '/vendor/autoload.php'; session_start(); //add your auth 2 client id and client secret here $OAUTH2_CLIENT_ID = "PUT YOUR CLIENT ID"; $OAUTH2_CLIENT_SECRET = "PUT YOUR CLIENT SECRET "; $client = new Google_Client(); $client->setClientId($OAUTH2_CLIENT_ID); ...