6
votes

I am having this error <"Access Not Configured. Gmail API has not been used in project ********* before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/gmail/overview?project=********* then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.">

I know Im having problem with the product ID. Couple of days ago my friend was running calendar API with my Pycharm and then he verified with his account with all the credentials. But I also created a new project>created new Credential. Downloaded the secret Json file and replaced with previous. I also checked the Json file, and the client ID was mine. But still Pycharm is still looking for that client ID which was my friends client ID. How do I resolve it?

I also tried opening new projects in Pycharm but still having same problem. I am new to python and Google APIs. If my question was too simple/obvious please pardon and help me out with the solutions.

The code I am using is given in this link, quickstart.py by Google developer page.

1
Try the suggested solution in this SO question by enabling the Google + and Google Contacts API in your developer Console. If this step doesn't work, then try the other solution that you can find in it. Also, if you create a project, then make sure you use the client_id for this project. For more information, check this link.KENdi

1 Answers

4
votes

I finally solved the issue. I didn't enabled the gmail API from the console page. In the console page go to dashboard, next enable API and choose which API you want to enable. In my case it was Gmail.