How to import contacts from google using php?

JPC Technologies
2 min readJan 11, 2016

--

Inviting friends over a website or webapp is a key factor to get in more traffic and users. Often inviting friends to a good website may go viral within few hours.

In this tutorial we will explain you the process of getting the contact list using google APIs for the signed is user along with a PHP script to extract the list in a variable.

Please follow below steps and in case of any difficulties please feel free to report an issue in github.

  • Get API Keys from google
  1. Login to your google account
  2. Visit https://code.google.com/apis/console/
  3. Under APIS and Auth click on APIs to see the list of API on left, Enable “Contacts API” from that list.

4. Create a new oAuth Client ID by clicking on “Create new Client ID”

5.In the form select “Web Application” and Enter the proper URL for “Authorized Javascript Origins” and “Authorized Redirect URL”. And click on “Create Client ID”. For the sake of this example we have kept it as same link where you will run index.php file.

Read More >>

--

--

JPC Technologies

JPC Technologies - Idea to Innovation. We are a highly passionate group of technologists, active in IT services, IT solutions and consulting space!