Google contacts subgroup of a group of contact - google-contacts-api

There is a way to replicate a subgroup contacts structure via java api as like when someone import a csv in their contacts.
My contacts
->Co workers
etc...
How i can do this with the google contacts java api??'

I can only point to these google pages:
2009
2012/13
According to these discussions it was requested but is not implemented.
I use the work-around presented in the second link:
Create My contacts
Create My contacts.Co workers
Add contacts to the respective groups
Add all sub-group members to the parent-group
Since this is not supported by Google, I doubt there is a solution with their java API.

Related

Google People API: no way to search contacts?

Just noticed today the following announcement:
Google Contacts API is now deprecated and is scheduled for sunset on June 15, 2021. Apps should instead use the People API.
Which is fine except the fact that People API does not provide any way to search contacts like the old Contacts API provided with ?q=.
Fulltext query on contacts data fields. The API currently supports simple search queries such as q=term1 term2 term3 and exact search queries such as q="term1 term2 term3"
Is there any way to do this simple text searching using People API?
So far it is not possible, but there is a feature request for it open on Google's Public Issue Tracker.
Give it a "star" to indicate that you are also interested in the feature - this will help to increase visibility.

Retrieve Google Contact create date

I need to retrieve the creation date of a Google Contact.
I know that I can use getLastUpdated() to get the last modified date, but I need the create date.
Is there any solution to this?
You can use Google Contacts API. From the response body you will be able to get the created date. Also this post from stackexchage suggested to use API Playground to visually walk through making a request to get the data you want from Google Contacts API.
This information is not traditionally exposed through the Google
Contacts online interface. However! You can get access to "created"
and "updates" dates and times using the Google Contacts API.
If you're not a developer, you can use the API Playground to visually
walk you through making a request to the Google Contacts API to get
the data you want.

Is there any way that i can retrieve account_id from google contact api v3 to make a get request to google people api?

I have retrieved all my contacts using Google Contact API. Now, i want to get the google profile info of all those contacts using the get request as mentioned in this People API GET link. But i do not see any id in the response to make a request.
The Contacts API and People API are separate API's not meant to interop with each other.
That said, the reverse engineered way to do this is to take the Contacts API contact ID, parse that hexadecimal value, convert it to decimal, and add a 'c' prefix to it, and that becomes the People API person resource ID.
e.g. if the Contacts API contact ID was 100, then the People API person ID would be c256. When you fetch contacts from the People API in this fashion, it'll have the joined profile information, if present.

Is there any way to get other contacts from Google People API? [duplicate]

I'm having a problem with the 2 APIs above. Given the next scenario: I have 2 different google accounts. One that doesn't use Google+ and a second account that uses Google+
When using Contacts API on the first account that doesn't use Google+ I can see all my contacts:
GET /m8/feeds/contacts/<email>/full
Same for the second account that uses Google+.
When I'm using People API for the first account that doesn't use Google+, I'm getting an empty response (actually I'm getting just the next sync token:
GET https://people.googleapis.com/v1/people/me/connections
With the next scope:
https://www.googleapis.com/auth/contacts
Returns:
{
"nextSyncToken": "CMe6...."
}
The same call for the second account (with Google+) works like a charm
The only difference between the 2 accounts is Google+, is it possible that People API only works for accounts with Google+? Or is it something else that I'm missing
I found the difference between the 2 APIs and it has nothing to do with the fact that one of the accounts is connected to Google+ or not
People API will only fetch the contacts that are under the account "My contacts" contacts, while Contacts API will also fetch the other contacts lists ("Other contacts", "Most contacts", ...)
The People API is the newer version.
From Google APIs related to People API page:
The Google Contacts API will be deprecated in the future. The People API is the recommended replacement for apps that read contact data.
It is also important to note that the People API does in fact allow the developer to use "other contacts" just like Contacts API did. In addition, when migrating you should not have to re-ask for user consent to the following:
https://www.google.com/m8/feeds
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/contacts.readonly
Please see these links for further reading:
https://developers.google.com/people/related-apis (Contacts API vs People API)
https://developers.google.com/people (Intro to People API)
I basically just copy/pasted most of this stuff but hopefully, some people find this helpful as I too was curious to find these answers :)

Google Contacts API V3, how to search

There are various examples provided in this link https://developers.google.com/admin-sdk/directory/v1/guides/search-users by Google. However, I can't seem to find what I am looking for. I want to pull all contacts that include phone numbers or city only. The search query doesn't seem to support something like addressStreet:isExists. Any inputs?
EDIT
When I view Contacts in my GMail, only those I created manually (have phone and address) are displayed. The ones automatically created by GMail (whenever an email is exchanged with someone GMail apparently creates a contact). When I pull contacts via Google Contacts API v3, I get thousands entries back, most of those are those automatically created ones.