Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Not Configured. Gmail API has not been used in project ********* before or it is disabled. (Python, Gmail API)

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.

like image 407
M Alam Telot Avatar asked Mar 30 '17 08:03

M Alam Telot


People also ask

How do I connect Gmail to Python?

As for the actual Python code, all you need to do is call the login method: import smtplib gmail_user = '[email protected]' gmail_password = 'P@ssword! ' try: server = smtplib. SMTP_SSL('smtp.gmail.com', 465) server.

How can I read Gmail with Gmail API in PHP?

php'; $client = new Google_Client(); $client->setClientId($this->config->item('gmailapi_clientid')); $client->setClientSecret($this->config->item('gmailapi_clientsecret')); $client->setRedirectUri(base_url('auth')); $client->addScope('email'); //$client->addScope('profile'); $client->addScope('https://mail.google.com' ...


1 Answers

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.

like image 123
M Alam Telot Avatar answered Sep 18 '22 01:09

M Alam Telot