1

I have an issue with Gmail API.

I did everything the same as is described in the following link: https://developers.google.com/gmail/api/quickstart/java#prerequisites

I'm using Windows 8.

Error:

Exception in thread "main" java.io.FileNotFoundException: Resource not found: /credentials.json
        at GmailQuickstart.getCredentials(GmailQuickstart.java:46)
        at GmailQuickstart.main(GmailQuickstart.java:63)

I already tried the solution from this link but it doesn't fix the problem: java.io.FileNotFoundException: Resource not found: /credentials.json on Java QuickStart for Classroom API

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Stefan
  • 25
  • 7
  • Side note: Is the `selenium` tag directly relevant to your problem? If not, you should remove it from the question. If it is (or may be) relevant, maybe you can [edit] the question and clarify how? – andrewJames Apr 10 '21 at 19:23
  • do you have the credentials.json file generated from GCP? where do you have it located locally? – iansedano Apr 12 '21 at 08:11

1 Answers1

0

use the path in your code as src/main/java src/main/resources/credentials.json instead of /credentials.json

Sonali Das
  • 943
  • 1
  • 7
  • 24