Export to GitHub

oauth-php - issue #96

400 Error using googledocs.php example! URGENT


Posted on Jan 20, 2011 by Happy Bird

What steps will reproduce the problem? 1. Download the oauth-php-175.tar.gz file, and untar and upload the oauth-php directory to the server. 2. Fill in "consumer key" and "consumer secret" in example/client/googledocs.php 3. Try to access googledocs.php

What is the expected output? What do you see instead?

I would expect to be forwarded to google so the request token can be authorized. INSTEAD, this is the result: OAuthException: Unexpected result from the server "https://www.google.com/accounts/OAuthGetRequestToken" (400) while requesting a request tokenobject(OAuthException2)

What version of the product are you using? On what operating system?

oauth-php-175 on both Windows 7 and CentOS

Please provide any additional information below.

I have been using the oauth-php library successfully for a few weeks now. Suddenly, everything broke and I can't use it anymore! I need this fixed ASAP as we're using this library for an urgent release that's coming out in the next few days.

I am using the correct consumer key AND secret, if I go to Google's OAuth playground I can successfully view contacts and everything using my consumer key and secret. ALSO, if I change the "https" urls to "http", the script spits out a 302 exception code?

I'm so confused. This was working fine a few days ago, now it doesn't work - I made NO changes. I have tried your example, and it does not work. Please help, this is a great library and I don't want to convert ALL my code over to a library that works.

Comment #1

Posted on Jan 20, 2011 by Massive Lion

Which previous version were you using that was working?

Comment #2

Posted on Jan 20, 2011 by Happy Bird

I was using the same version..

--

[image: LinkIt_Logo.png] http://www.linkitus.com/

Link-It, LLC

Michael Mackus

Software Developer

23811 Washington Ave Suite C110-108

Murrieta, CA 92562

michaelmackus@linkitus.com

Office: (951) 300-4905

Direct: (951) 215-6470

Comment #3

Posted on Jan 21, 2011 by Massive Lion

Ahn, if you didn't upgrade, it must have been something you did.... Reset your database, check your code for changes, see if someone changed oauth-php by accident.

Comment #4

Posted on Jan 21, 2011 by Happy Bird

It was my fault! After further inspection, it seems google was saying the timestamp was "too far from the current date". So I just set the box's date to the correct date and it worked!

Sorry, you can close this issue!

--

[image: LinkIt_Logo.png] http://www.linkitus.com/

Link-It, LLC

Michael Mackus

Software Developer

23811 Washington Ave Suite C110-108

Murrieta, CA 92562

michaelmackus@linkitus.com

Office: (951) 300-4905

Direct: (951) 215-6470

Status: Invalid

Labels:
Type-Defect Priority-Medium