Can not authenticate with UserInfo service

71 views
Skip to first unread message

Bao Le Duc

unread,
May 3, 2012, 10:08:16 PM5/3/12
to google-api...@googlegroups.com
Hello,

I'm testing the OAuth2 service with google-api-php-client library to access UserInfo of logged users. The code is taken from examples/userinfo/index.php with little change to cope with my host. When running the example, it passed through Google login form. When it came back to my site, an exception thrown as following. 

Fatal error:  Uncaught exception 'apiIOException' with message 'HTTP Error: (0) couldn't connect to host' in /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php:120
Stack trace:
#0 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php(46): apiCurlIO->makeRequest(Object(apiHttpRequest))
#1 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiREST.php(55): apiCurlIO->authenticatedRequest(Object(apiHttpRequest))
#2 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/service/apiServiceResource.php(151): apiREST::execute(Object(apiServiceRequest))
#3 /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/contrib/apiPlusService.php(207): apiServiceResource->__call('get', Array)
#4 /home/ztbmwjhd/public_html/apis/at/googleplus/google-plus-access.php(40): PeopleServiceResource->get('me')
#5 /home/ztbmwjhd/public_html/apis/at/googleplus/index.php(2): include_once('/home/ztbmwjhd/...')
#6 {main}
  throw in /home/ztbmwjhd/public_html/apis/at/googleplus/google-api-php-client/src/io/apiCurlIO.php on line 120

Thank you for your help

Chirag Shah

unread,
May 3, 2012, 11:28:43 PM5/3/12
to google-api...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages