Google Contacts API with Google oAuth

Connecting EnterMedia with Google oAuth also allow you to use some of the known Google APIs. You can easily enable Google Contacts in your EnterMedia instance to autocomplete the destination email field when you are sharing an Asset by Email.

First you need to create a Project in your Google Cloud Platform to allow you connect the APIs services.

Go to your APIs & Services Dashboard in your Google Console and click on ENABLE APIS AND SERVICES:

 

By default, the Google Contact API is disabled.

To enable it, you should find the OauthModule.java file, comment line 96:

requestedpermissions = "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email openid";

And uncomment line 95:

//requestedpermissions = "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email openid  https://www.googleapis.com/auth/contacts.readonly"; //Put it in the xocnf

Then, once trying to log into the DAM using your Google Account you will be ask to allow the app to access your Google Contact list.

Then you need to change the field Render Type for the sharewithemail field in the Order table to render as Auto Complete, also in the advanced options set up the listid property of this field to  “googlecontact“.

Authenticate in EnterMedia with a valid Google Account and you should be able to get your Google Contact List in the Share by Email function.