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.
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.
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' ...
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With