Category Archives: Google API

News: Google API with 5Gb and $ 300 free trial .

The Cloud Shell from Google API provisions 5GB of persistent disk storage mounted as your $HOME directory on the Cloud Shell instance.
All files you store in your home directory, including scripts and user configuration files like .bashrc and .vimrc, persist between sessions.
You can try it from here with Supplemental Terms and Conditions For Google Cloud Platform Free Trial.
Also you can get free $300 when sign up to spend on Google Cloud Platform over the next 12 months.
You need to add your credit card to get free $300 free trial.

Posted in All, Google API. Tagged with , , .

Using python to make authentication into GMail API.

Is simple to do with python. The script I make is simple without classes.
Let’s start with first steps:
You need to create your project and then one credential with json file.
See the next image to see how is your json file. My json file is renamed to client_secret.json and is used by python script.
The json file is into same folder with my python script.
After first run the script will make one json file named: gmail-python-quickstart.json.
Is simple way to get and put credentials to solve authentification to google.
Another step is to add GMail API library to your project. This allow you to use the functions from the GMail API.
The python script is very simple to do. Follow the part of this script.
Is need to use some python modules. One reason is to deal with email format, see email python module.
Some python modules are used to make authentication to google: oauth2client and apiclient.
I used argparse python module , but is no need to add arguments to the script.
The result of this script will send a email to:
The email is created by CreateMessage function.
About the special value “me” that come from Google API and is for user.

Posted in All, Google API, Programming, Python. Tagged with , , , , , , , .