Python - google drive authentication using email and password - python

I'm creating a simple python 2.7 application that uploads files to Google drive.
I've used PyDrive examples and they work quite well.
But in all the examples they all require the client to get their authentication secret key from their Google account and add it to the client_secrets file.
Is there a way to authenticate to Google drive in Python using Client email and password credentials?
I know this is possible using google spreadsheet (API unavailable)

Related

Reading and writing a public google sheet with python

I have a public google sheet that has a bunch of license keys. I am trying to automate the read and write process from said sheet. eg. take code, run it, mark it as used.
After reading https://medium.com/analytics-vidhya/how-to-read-and-write-data-to-google-spreadsheet-using-python-ebf54d51a72c
as well as the Google's tutorial https://developers.google.com/workspace/guides/create-project
Both of those instructed me to create a google cloud platform account. Since the sheet is public, has anyone managed to read/write without it?
To make requests to a Google Workspace API with a Python command-line application, you need to complete a couple of steps in the Google Cloud Platform Console. In this case if you're using the Google Sheets API to access a Google Sheet even if is public, you need the following prerequisites which asks you to have a Google Cloud Platform project with the API enabled and create credentials for your application in the GCP console.

How to authorize Google API without user interaction in 2020?

I am using a simple script to transfer data to google drive. The script is managed by Cron (independently of the user). How to authenticate google api without user interaction? There used to be a oauth2client (SignedJwtAssertionCredentials) library in Python, but it is no longer supported.

Using My Self Google Drive Api Without Oauth

I am using Google Drive Api for my Python/Flask App. This app is analyzing the picture and hiding the pictures it will analyze on google drive. The pictures already exist on my own google account.
I am using Oauth2 to access these images. But since I already have my own drive account, Oauth2 is pretty useless.
How do I get to drive outside Oauth2?
Please familiarize yourself with OAuth2 before judging the quality of the protocol.
You have to use OAuth2 with the Google Drive API in order to give permission to your application to perform actions on your behalf.
Think of OAuth2 as a "log-in" mechanism for your application into Google's products, like Drive.
Also, familiarize yourself with the Python Quickstart to understand how to do this.

Logging with google acount in Flask

I'm starting a web project (in flask) in which the user needs to authenticate with his google account to later save data files in his Google Drive using PyDrive
Flask has a few libraries to authenticate but reading their doc, not all of them support OAuth2. The following 2 libraries DO support Oauth2 though.
Flask-OpenID
Flask-GoogleLogin
My question is, what is the best form to authenticate the google account? Or there is some extension for Google to make an even easier logging?

How to authenticate as myself for Google Drive API?

I have not found a satisfactory answer/tutorial for this, but I'm sure it must be out there. My goal is to access Google Drive programmatically using my credentials. A secondary and lower-priority goal is to do this properly and that means using OAuth rather than ClientLogin.
Thus: How do you authenticate with the Google Drive API using your own credentials for your own Google Drive (without creating an application on the Google Developers Console)?
All of the documentation assumes an application, but what I'm writing is merely helper scripts in Python 2.7 for my own benefit.
"How do you authenticate with the Google Drive API using your own credentials for your own Google Drive (without creating an application on the Google Developers Console)?"
You can't. The premise of OAuth is that the user is granting access to the application, and so the application must be registered. In Google's case, that's the API/Cloud Console.
In your case, there is no need to register each application that uses your helper scripts. Just create an app called helper_scripts, embed the client Id in your script source, and then reuse those scripts in as many applications as you like.

Categories

Resources