Integrating Google Contacts API with Cordova in IONIC Application

I’m building an IONIC mobile app and need to fetch contacts from Google account using Cordova plugins. I want users to be able to pull their Google contacts directly into my app but I’m not sure about the best approach.

I’ve been looking into different methods but can’t figure out which Cordova plugin would work best for this. Should I use OAuth authentication first and then call Google Contacts API? Or is there a simpler way to accomplish this?

Has anyone successfully implemented Google contacts integration in IONIC? What steps did you follow and which plugins did you use? Any code examples or guidance would be really helpful since I’m stuck on this feature.

start with cordova-plugin-contacts - it’ll probably pull google contacts automatically if the user syncs them to their device. much easier than messing with oauth. if that doesn’t work, then go the google auth route, but try the simple approach first.

I built this feature six months ago and hit tons of roadblocks before getting it working. Don’t use cordova-plugin-contacts - it only grabs locally synced contacts, and most users have that turned off these days. For real Google Contacts integration, you need cordova-plugin-inappbrowser plus custom OAuth. Set up your OAuth by sending users to Google’s auth URL, then catch the callback in InAppBrowser. Once you get the auth code, swap it for access tokens on your server (don’t expose your client secret). Use Google People API v1 - the old Contacts API is dead. Pro tip: request offline access in your OAuth scope or you’ll struggle with refresh tokens like I did. Parsing contacts is a pain but doable once you figure out their person resource format.

Had the exact same issue last year on a similar project. I used cordova-plugin-googleplus for auth and hit the Google People API directly (it replaced the old Contacts API). You’ll need to enable People API in Google Cloud Console and add ‘https://www.googleapis.com/auth/contacts.readonly’ to your OAuth scope. Once you get the access token from the Google+ plugin, just make HTTP requests to the People API endpoints. Heads up - the contact data structure is weird and nothing like you’d expect. Google returns connections in their own format that needs parsing. Don’t forget pagination since they limit contacts per request. Took me about a week to nail down, but totally doable once you get the auth flow.