I'm trying to learn how to access Google Drive from Python but I have problems.
I followed the tutorial of google's official website: https://developers.google.com/drive/...t-python?hl=es In addition, i have seen the video tutorial about this, I think I do the same than the video guys exactly.
I tell you the steps I've followed literally:
1 - Install pip tool to install the SDK from Google.
2 - Install the SDK from Google: "pip install --upgrade google-api-python-client"
In this step all goes well, in fact to make imports etc. there is no fault.
3 - Drive Enable API: I follow the steps as is, create a "client ID for native application" and a "client ID for web application "
4 - I create the document "document.txt" and copy the source code as it quickstart.
5 - I replace "CLIENT_ID" and "CLIENT_SECRET" by appearing in "Client id for native application" (I've also tested with web application)
6 - I run, and screen output is:
No handlers could be found for logger "oauth2client.util"
Go to the following link in your browser:
<link>
Enter verification code:
Looking for a solution, i found something to get some information about that error:
import logging
...
logging.basicConfig()
Now, the output is:
C:\workspaces\asd\prsGoogleApi>quickstart.py
WARNING:oauth2client.util:__init__() takes at most 4 positional arguments (5 giv
en)
Go to the following link in your browser:
<link>
Enter verification code:
If I try to access that link, the error is:
401 - That's an error
Error: invalid_client.
No application name.
Request details:
response_type=code
scope=https://www.googleapis.com/auth/drive
access_type=offline
redirect_uri=urn:ietf:wg:oauth:2.0:oob
client_id=...