I am being randomly bugged by the following error message:
This occurs when php library tries to obtain the access token line 112.
Sometimes my code obtains access token in first try, sometimes I need to refresh the URL containing 'code' as get parameter multiple times before access token is obtained.
This error is coming frequently for last 3-4 days.
Fatal error:
Uncaught exception 'apiAuthException' with message 'Error fetching OAuth2 access token, message:
'<HTML> <HEAD> <TITLE>Error processing OAuth 2 request</TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Error processing OAuth 2 request</H1>
<H2>Error 500</H2>
</BODY> </HTML>
'' in /google-api-php-client-0.5.0/google-api-php-client/src/auth/apiOAuth2.php:105
Stack trace: #0 /google-api-php-client-0.5.0/google-api-php-client/src/apiClient.php(138): apiOAuth2->authenticate(Array)
#1 l.php(191): apiClient->authenticate()
#2 l.php(99): googoauthinit(true)
#3 {main} thrown in /google-api-php-client-0.5.0/google-api-php-client/src/auth/apiOAuth2.php on line 105
The code I use is directly lifted from here (EXACTLY same code with all parameters like app name, secret key, id etc correctly filled). Also, tried registering new app but same error is received.