Leveraging Google API Using Python

This project leverages Python to use Google API

Create a virtualenv so as not to screw up your current operating system libraries and system dependencies.

Install virtualenv on Mac/Linux:

sudo apt install python3-virtualenv # Use python 3 if you both have python 2 and python 3. Why? because Python 3 is more badass.

Use the command:

virtualenv <your-env> # create the virtual environment using the name you specify
source <your-env>/bin/activate # using the command to activate the virtual environment to use it
<your-env>/bin/pip install google-api-python-client # install the required package to make google api python work baba
<your-env>/bin/pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib

By executing the quickstart.py file I was able to authenticate the Directory API and make magic go boom boom because the gmail is now authenticated using the OAUTH2.0 🙂

In the next projects I will use the Directory API to pull out email details, users, organizational units, and email forwarding rules.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s