0

I'm trying to use Gmail API using Java, and for the beginning, I tried to run the following script: https://github.com/googleworkspace/java-samples/blob/master/gmail/quickstart/src/main/java/GmailQuickstart.java

I've downloaded the credential needed and installed relevant Google packages. (I hope I didn't mess up with this, an incorrect version, etc...)

I manage to get to the line:

        AuthorizationCodeInstalledApp credential1 = new AuthorizationCodeInstalledApp(flow, receiver);

the default browser opens up and I give access permissions, But right afterward in the line:

        Credential credential2 = credential1.authorize("User");

it throws the following exception as shown in the attached file. (I changed the line a bit, in order to understand what part of the original line threw the exception, my code is as shown in the file attached, it is the only difference)

Do you have any idea what to do?

Thank you!!

enter image description here

Leah Golub
  • 15
  • 4
  • Does this answer your question? [ClassNotFoundException: io.opencensus.trace.propagation.TextFormat not found](https://stackoverflow.com/questions/56950415/classnotfoundexception-io-opencensus-trace-propagation-textformat-not-found) – Bryan Monterrosa May 24 '23 at 11:37
  • No, because it is not how I work. The building way there is not familiar to me. But I moved to work with Python and managed to do what I wanted to do... – Leah Golub May 24 '23 at 14:36

0 Answers0