sscarpa / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Google plus oAuth 2.0 - Fatal error! #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, I am trying to get oAuth2.0 for Google Plus, I did some testing around, 
and it was working fine, then something went wrong, I was trying alot of 
things. Even when I use the "google-api-php-client/examples/plus/" I am still 
getting the same error. I am trying to get information on my self with oAuth 
2.0, but insted of that I get this
"Fatal error: Uncaught exception 'apiAuthException' with message 'Error 
fetching OAuth2 access token, message: '<HTML> <HEAD> <TITLE>Invalid content 
type specified in the request</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" 
TEXT="#000000"> <H1>Invalid content type specified in the request</H1> 
<H2>Error 400</H2> </BODY> </HTML> '' in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/au
th/apiOAuth2.php:104 Stack trace: #0 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/ap
iClient.php(131): apiOAuth2->authenticate(Array) #1 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/exampl
es/plus/index.php(37): apiClient->authenticate() #2 {main} thrown in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/au
th/apiOAuth2.php on line 104"

- I use lastes version. This happens after this proces:
1. I click "Connect me"
2. It opens dialog-box for accsepting authorization, I press yes!
3. It redirects me back to my "redirect_url" and it shows this error!

Please help!

Original issue reported on code.google.com by mmetalg...@gmail.com on 18 Jan 2012 at 1:31

GoogleCodeExporter commented 8 years ago
This happen after I did some tryouts here: 
https://developers.google.com/+/api/latest/people/get

When I switch to --Using Public Access. "Switch to Private Access" with scope...
...
I try to switch back to Useing Public access, and remove auth. from my auth. 
profile panel.

and then I get this error on trying again:

Fatal error: Uncaught exception 'apiServiceException' with message 'Error 
calling GET 
https://www.googleapis.com/plus/v1/people/me?alt=json&key=AIzaSyDvzSzCTJ0d1oLMXZ
aN4E7S1-lSrfUnZ2s: (403) Access Not Configured' in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/io
/apiREST.php:86 Stack trace: #0 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/io
/apiREST.php(56): apiREST::decodeHttpResponse(Object(apiHttpRequest)) #1 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/se
rvice/apiServiceResource.php(151): apiREST::execute(Object(apiServiceRequest)) 
#2 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/co
ntrib/apiPlusService.php(207): apiServiceResource->__call('get', Array) #3 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/exampl
es/plus/index.php(47): PeopleServiceResource->get('me') #4 {main} thrown in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/io
/apiREST.php on line 86

Original comment by mmetalg...@gmail.com on 18 Jan 2012 at 1:43

GoogleCodeExporter commented 8 years ago
Hey, can you upgrade to this version of the client library? I just pushed it 
out, and it should fix the issue you're seeing.

http://code.google.com/p/google-api-php-client/downloads/detail?name=google-api-
php-client-0.4.8.3.tar.gz

Original comment by chirags@google.com on 18 Jan 2012 at 3:26

GoogleCodeExporter commented 8 years ago

Original comment by chirags@google.com on 18 Jan 2012 at 3:36

GoogleCodeExporter commented 8 years ago
Yes thanks alot, I fixt it! ;)

Original comment by mmetalg...@gmail.com on 18 Jan 2012 at 5:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Getting this issue in source code which is getting from above download link

http://code.google.com/p/google-api-php-client/downloads/detail?name=google-api-
php-client-0.4.8.3.tar.gz

Please Any one can help me

Fatal error: Uncaught exception 'apiServiceException' with message 'Error 
calling GET https://www.googleapis.com/plus/v1/people/me?alt=json: (403) Access 
Not Configured' in 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/src/io/apiREST.php
:86 Stack trace: #0 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/src/io/apiREST.php
(56): apiREST::decodeHttpResponse(Object(apiHttpRequest)) #1 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/src/service/apiSer
viceResource.php(151): apiREST::execute(Object(apiServiceRequest)) #2 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/src/contrib/apiPlu
sService.php(207): apiServiceResource->__call('get', Array) #3 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/examples/plus/inde
x.php(48): PeopleServiceResource->get('me') #4 {main} thrown in 
/export/zend/apache2/htdocs/tentshops/google-api-php-client-2/src/io/apiREST.php
 on line 86 

Original comment by aperu...@sirahu.com on 5 Mar 2012 at 1:23

GoogleCodeExporter commented 8 years ago
The error "(403) Access Not Configured" means you need to register you project 
with the Google API Console:
https://code.google.com/apis/console/?api=plus

Visit https://code.google.com/apis/console/?api=plus to generate your developer 
key, OAuth2 client id, OAuth2 client secret, and register your OAuth2 redirect 
uri.
- From the "Services" screen, activate access to "Google+ API".
- Click on "API Access" in the left column
- Click the button labeled "Create an OAuth2 client ID"
- Give your application a name and click "Next"
- Select "Web Application" as the "Application type"
- Click "Create client ID"
- Click "Edit..." for your new client ID
- Under the callback URL, enter the fully qualified URL for your PHP 
application (example http://localhost/googleplus/index.php).

Original comment by chirags@google.com on 5 Mar 2012 at 4:44

GoogleCodeExporter commented 8 years ago
Hello, I am trying to get oAuth2.0 for Google Plus, I did some testing around, 
and it was working fine, then something went wrong, I was trying alot of 
things. Even when I use the "google-api-php-client/examples/plus/" I am still 
getting the same error. I am trying to get information on my self with oAuth 
2.0, but insted of that I get this
"Fatal error: Uncaught exception 'apiAuthException' with message 'Error 
fetching OAuth2 access token, message: '<HTML> <HEAD> <TITLE>Invalid content 
type specified in the request</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" 
TEXT="#000000"> <H1>Invalid content type specified in the request</H1> 
<H2>Error 400</H2> </BODY> </HTML> '' in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/au
th/apiOAuth2.php:104 Stack trace: #0 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/ap
iClient.php(131): apiOAuth2->authenticate(Array) #1 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/exampl
es/plus/index.php(37): apiClient->authenticate() #2 {main} thrown in 
/home/content/24/7680024/html/proofilus/html/signup/google-api-php-client/src/au
th/apiOAuth2.php on line 104"

I just sold the problem by delete
src/apiClient.php line 54
require_once('service/apiMediaFileUpload.php'); 

Original comment by chuchcis...@gmail.com on 13 Jul 2012 at 3:37