Wednesday, July 11, 2012

[YouTube-API] Odd Zend BadAuthentication Error

Hi,

I'm not entirely sure I'm going about this correctly, but I've
searched the web extensively for a solution to my problem and I cannot
seem to find it, but I did find this forum and thought I'd give this a
try.

I've built an application (a wordpress plugin) that uses the Zend
framework to upload videos to youtube. I've actually completed the
project, and tested it extensively on multiple web servers, and it
works perfectly. However, when my client activates the plugin on his
server, and attempts to perform the upload action, he gets the
following error:

Uncaught exception 'Zend_Gdata_App_AuthException' with message
'Authentication with Google failed. Reason: BadAuthentication'

and the line where it happens:

$authenticationURL = 'https://www.google.com/accounts/ClientLogin';
$http_client = Zend_Gdata_ClientLogin::getHttpClient(
$ytd_params['username'],
$ytd_params['password'],
$service = 'youtube',
$client = null,
$source = 'VideoUploder', // a short string identifying your
application
$loginToken = null,
$loginCaptcha = null, $authenticationURL
);

Solutions I've found by Google search say that I need to make sure I
have the correct account type. However, I created a specific test
account on YouTube's page for testing this application, and using it
still throws this error. Additionally, like I said before, it
successfully uploads the videos on my web servers.

The application was developed on a server provided by
lowesthosting.com. My client is using a server hosted by
hostgator.com. The servers have the same PHP version (5.2), exact same
Zend framework code, running on Linux (I believe the same kernel),
even the same version of Wordpress (although I can't imagine most of
these factors have anything to do with Zend). I even sent him my
application again last night after thorough testing on my servers to
ensure he has up-to-date code.

I'm just curious, as I'm not a Zend expert by any means (this is my
first project using Zend).... is there anything that hostgator could
be doing differently that could cause the same exact call to
getHttpClient() to fail on its servers while working on others?

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment