Trying to simply upload video using Google API PHP Client (latest release 1.1.6), but code in Youtube API V3 is not working and giving 500 internal server error.
What is
Strangely a very small tweak in code fixes the problem.
Instead of just $videoPath = "/path/to/file.mp4"; using DOCUMENT_ROOT solves the issue. Other than that code of documentation is perfect.
$videoPath = "/path/to/file.mp4";
$videoPath = $_SERVER["DOCUMENT_ROOT"] . "/mapapp/videos/test.mp4";