0
votes

I have been developing a Java language application.

Now i am trying to show the logged in user photograph as part of the user data, but i dont seem to get it right.

Through UserService i am getting the user id, and with the user id and my application api key, i am trying to build the image url to load it into my application.

But it isnt working.

The url i am building is : https://www.googleapis.com/plus/v1/people/{USER_ID}?fields=image&key={API_KEY}

But i keep getting the same error :

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
   "message": "Access Not Configured. Please use Google Developers Console to activate     the API for your project."
 }
}

I have enabled as well the following API in Google Developers Console:

Drive API   
Drive SDK   
Google Cloud SQL    
Google Compute Engine   
Google Picker API
Google+ API

Can anyone lend me a hand on this?. Sorry if i waste your time with something obvious.

1
You can get image url directly in Json file , but I don't know JavaJeyhun

1 Answers

0
votes

Check that you're using the right value for the API key. They're under Public API access in the Credentials section of the developer console and should look like something like this: AIzaSyC2WWuM97gdij5k5uRduLFeL3LuURBvFpo - make sure it's of that form, and associated with the project you have enabled the API for.