Unable to access user's profile from Google Plus
Asked Answered
L

2

5

I am using Scribe-Java to connect to Google plus using OAuth2. I am able to authenticate my application and obtain user's permission, but when I try to access anything other than userinfo, I am getting this Exception.

403

{

"error": {

  "errors": [
            {

          "domain": "usageLimits",
           "reason": "accessNotConfigured","message": "Access Not Configured"

            }

            ],

  "code": 403,

"message": "Access Not Configured"

     }

}

I have set the scope of my application as https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/userinfo.profile and to access user's profile I am using this url:

https://www.googleapis.com/plus/v1/people/{userid}/activities/public

Can you tell me what I am doing wrong? Is there some other scope that I need to use here to access the Profile?

Levan answered 18/6, 2012 at 12:9 Comment(1)
Could you set Scribe's debug mode on? Also, a 403 response usually means that you're not allowed to perform that action, regardless of authorization issues.Scrubber
D
11

1) Visit the Google APIs console: http://code.google.com/apis/console

2) Go to the 'Services' page.

3) Enable the Google+ API by switching it to On

Diesis answered 19/6, 2012 at 1:5 Comment(3)
Can you explain how exactly it will help? I am able to get userinfo even without switching the google+ api to on.Levan
It should eliminate the 403 accessNotConfigured error. This is not necessary for the userinfo endpoint as it is used for other purposes (like OpenID Connect/OAuth 2.0 authentication). Note that the Google+ API documentation states that you should "Activate the Google+ API in the Services pane of the Google APIs Console." More info here: developers.google.com/+/api/oauth#aboutDiesis
Worked for me when I switched on the corresponding API in admin console. thanksSiskind
D
0

I got the same error in PHP using HybridAuth:

I had to activate the following in the Google Developers Console in APIs & Auth -> APIs

  • Contacts API
  • Google+ API

See also the discussion at http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html

Drudgery answered 20/3, 2014 at 8:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.