Search code examples
google-apigmail-apigoogle-developers-console

How to download credentials.json in Gmail API Enable Java


I am trying to enable Gmail API following steps in Java Quickstart. When I click on "Enable the Gmail API" button in the Google developer console, no option like "Download Client Configuration" is displayed.

So, I am unable to get credentials.json File.


Solution

  • Gmail API credentials are restricted to enhance apps security. To enable the credentials click on API Console after clicking on Enable the Gmail API. You will travel to a filled form on the Credentials menu on Google APIs. You can change there the name and/or restrictions to better suit your project. Finally, you can click on Generate key to finish the process.

    If you have followed the steps so far, you would have created the Gmail API credentials. To achieve your request you will need to click on Download JSON button on the right side of your newly created credentials. Do not hesitate to ask for more information if I haven't explained the process with enough detail.