Thanks to this guy, whose question and gist helps me understand the google api and requests for it to get access for google drive.
I found everything!
If anybody will be confused like me:
Get your google drive your_api_key from here:
in section with name “API keys” – or you can generate it by pushing “New Credentials” -> “API key”
Also you can get your token with google “quick start” even for python3:
Your token will be saved on system user’s folder (C:/Users/user/.credentials) or (/root/.credentials) for Linux if you run it under “root”. The token is in “access_token” key value.
Then you can generate request, but at first check this: http://docs.python-requests.org/en/master/user/quickstart/#custom-headers
And this is working example to get list of your google drive files:
Token is expiring very soon!
Для русскоязычных ребят ключевое слово: google api key получить
Curl example from docs:
A call to the
drive.files endpoint (the Drive API) using the
access_token query string parameter might look like the following, though you’ll need to specify your own access token:
Here is a call to the same API for the authenticated user (
me) using the
Authorization: Bearer HTTP header:
You can try out with the
curl command-line application. Here’s an example using the HTTP header option (preferred):
Or, alternatively, the query string parameter option: