- If you set up this option, your reports will be more richer with contact names information. Highly recommended!
- Create a Google project.
- Enable Contacts API.
- Create oAuth credentials i.e. Client ID and Client Secret keys
- Save the keys as a JSON file in your Secrets directory (this folder).
- You dont have to rename the long file name (but if you want, you can. Just dont change the file extension. Keep it as .json).
- All the files in Secrets directory (Except readme.md) are ignored. So you dont have to worry about accidentally publishing it on say github.
- Thus your secrets are safe on your computer (as long as your computer is safe from viruses i.e.)
- Do not add any other file here (atleast not a json file).
- Using your clientId and Client secret Key, get a refresh token (Detailed steps are given below) .
- Add this refresh token to your secrets json file with a key value pair
- looks like this (updated with dummy values): "refresh_token": "1//04abcdefghijklmopqurstuv-abcdefghijklmopqurstuv_zydfsfsdfsfsdfsdfdsfsnT68",)
- Later goal is to eliminate this step, so that you can just work with client id and client secret. Until then use this.
- To ensure that all your phone contacts are synced on google contacts, sync your contacts with google contacts.
- If you are on Iphone, follow this one time instructions to sync your contacts from icloud to google contacts
- If you are on android, checkout how to sync your contacts manually to google contacts (there are many videos on youtube. I dont have android so cant test this.)
-
Create Credentials (oAuth keys: Client ID and Client Secret keys) Either from the ContactsAPI page as shown below._

You can also view this anytime from the credentials page (or even set up from there as shown below)_

-
Get a refresh token using client id and client secret and add to secrets json file.
- Go to settings and check option "use your own OAuth credentials".
- Provide your client Id and client Secret and Close. Curtesy reference
- From the left pane now click on Step1 and select "Contacts v3" -> "https://www.goggle.com/m8/feeds/
- click Authroize APIs.
- Oops we get an error. We forgot to give a redirect url while creating our tokens.
- Go to your project (say MyProject). Click on Credentials and now click on the edit icon to edit the details in oAuth 2.0 ClientID.
- Now go back and try again with 'Step1' above to "Contacts v3" -> "https://www.goggle.com/m8/feeds/ and authorize APIs.
- This time you should be able to get an authentical code as shown below. First it will ask for Google signin.
- Exchange the authentication code for tokens.
- Copy the refresh token from here and add to client-secret_****.json
- We are all set now to get the contacts from Google APIs.
- Sync all your icloud contacts to google contacts.
- If for some reason, link on summary section, didnt open, below is pdf instructions of the same html page: Import-iphone-contacts-into-gmail
- You are good to go with your setup!
- How to insert images in github readme.md files
- Solution to get Names-Numbers
- Set a redirect URI (needed for step in getting indefinite refresh tokens)
- To create your google project
- To create your oAuth keys: Client ID and Client Secret
- To get Refresh tokens (Indefinite duration)











