Get Google Domain Shared Contacts or Google Private Contacts in VB.NET

This is how to retrieve Google Domain Shared Contacts and Private Contacts.

Code:

Dim _ContactsService As ContactsService = New ContactsService([AppName])
_ContactsService.setUserCredentials(p_Username, p_Password)
Dim query As ContactsQuery = New ContactsQuery(ContactsQuery.CreateContactsUri([PARAMETER]))
Dim feed As ContactsFeed = _ContactsService.Query(query)
Dim listOfContacts As List(Of ContactEntry) = New List(Of ContactEntry)
For Each c As ContactEntry In feed.Entries
     listOfContacts.Add(c)
Next

For private contacts method: [PARAMETER] = [USER_ID]

For domain shared contacts method: [PARAMETER] = [DOMAIN]

Advertisements

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: