Closed covalschi closed 2 years ago
I think you could use gauth.Get_Http_Object()
to get an Http client that can be used to do post / get requests. I'm not sure you need to replicate all this logic though (resumable in memory upload), it already exists. Check my answer here #224
Hello,
I'm using a service account and have to upload files from memory, so I've used this workaround:
As far as I understand, there's no refresh token for service accounts so as soon as I have the token it's fine. However, I'm forced to perform at least one operation (in my case I fetch folder id in another function) before gauth.credentials.access_token is populated. I've tried calling gauth.ServiceAuth() and gauth.Authorize(), but it didn't populate gauth.credentials.access_token. Is there a way to just get access token using pydrive2?
Thanks in advance.