0

I have downloaded the Google plus java starter project from here I set up maven, created my client_id and client_secret and my api_key and put these keys into the config.properties.

Now i started to run the project. the

setupTransport()

Method seems to work.

But if the

getProfile() 

Method is called an Exception is thrown.

This is the output:

Attempting to open a web browser to start the OAuth2 flow
Once you authorize please enter the code here: [entered my Code here]

============== Get my Google+ profile ==============

Okt 16, 2012 1:25:10 PM Sample getProfile
Schwerwiegend: {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
 }
}

Exception in thread "main" java.io.IOException: Stream closed
at java.util.zip.GZIPInputStream.ensureOpen(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at com.google.api.client.http.HttpResponse.parseAsString(HttpResponse.java:464)
at Sample.main(Sample.java:45)

EDIT:

i dont know what happened, but now it works. I only copy pasted the IDs again, refreshed my project and let eclipse build it again...

1
  • Sometimes the copy/paste of Client IDs messes up. But I am glad to hear that it works for you. I tested that starter on a fresh machine last week and had no problems. Commented Oct 18, 2012 at 0:49

1 Answer 1

3

Are you using the v5 .zip package from the downloads page? If so, could you try to checkout the code for the latest version and use that instead?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.