How tired I am of Google way how get API tokens

You must: Create application and take its id and secret. Make a GET request to send secret and id with needed scopes of access. Obtain TEMPORARY access token and refresh token (first lives about 3000 – 5000 sec, the second can probably live infinite) Use this access token to GET something through REST, check if this token is not expires already. You want to GET something ELSE? First check if your token is not expired, then if expired – use refresh token to get NEW TEMPORARY token. Do something else. Nice turn google! You are the best of masters of creating shitcode. Before starting real work on google API and my own project with Google Drive I’ll learn pythons “requests” perfectly,Short Read more…

Google Drive API

Thanks to this guy, whose question and gist helps me understand the google api and requests for it to get access for google drive. http://stackoverflow.com/questions/22534959/access-google-drive-api-in-python-whithout-google-api-python-client-installed-a I found everything! If anybody will be confused like me: Get your google drive your_api_key from here: https://console.developers.google.com/apis/credentials?project=[your_project] 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: https://developers.google.com/drive/v2/web/quickstart/python 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 toShort Read more…