What I'm trying to do is basically use PHP to upload videos without ever going to youtube itself. Several people need to use a form and be able to upload stuff with all the authentication done server-side. During the upload process, the fact that it's going on Youtube shouldn't even be apparent(not a secret, just want the authentication done without directing to other places).
Like a year or two ago I used this tutorial:
http://www.damnsemicolon.com/php/php-upload-video-youtube-zend-gdata
But it seems as though Google has changed the way they authenticate because it doesn't work anymore. The same thing that worked before now displays:
*"Fatal error: Uncaught exception 'Zend_Gdata_App_AuthException' with message 'Authentication with Google failed. Reason: BadAuthentication'"*
I also got an email from google, which told me they blocked the "suspicious" behavior from my server. I used the Google Unlock Captcha to authorize access, as well as marked the behavior as me. That didn't fix the problem, so either that doesn't do anything or there is something else causing the issue.
I've been trying to build it from the ground up using documentation but I'm not good at understanding those things. Is there an easy fix to the code I used in the first link? Or has google made it impossible to post stuff to your own channel in this manner?
[password and such are correct]
As jlmcdonald pointed out, the authentication API for Youtube has moved away from ClientLogin to oAuth2 exclusively. Check out https://developers.google.com/youtube/v3/guides/moving_to_oauth for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With