Google Contacts API V3 not returning title for automatic contact entries - google-contacts-api

I have an app that fetches a user's contacts from the Google Contacts V3 API after the user authenticates via OAuth2 (the requests are made using JSON). While my code works great in most circumstances, I have noticed that the API returns an empty title hash for contacts that get created automatically through emailing an address for the first time, which is less than ideal.
When I view "Other Contacts" under Google Contacts (where Google assigns these automatic contacts), these contacts seem to have an accurate title attribute. Is there a way I could potentially get access to this value? The response body doesn't seem to return this value within a contact entry.
Thanks.

Related

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.

Google Places javascript API request all published business locations from my account

I have a few Google Map locations added at my business.google.com account.
I'm trying to find a way to request all of them from my account; to include them in my website.
I've already signed up for my API key, and added my trusted domain, but I haven't found a way to request all of them with the API without already knowing either their locations or place ID.
My goal here is to manage only one list at Google account to keep them updated. I don't want double-management, adding and editing them both at my Google account and my website database.
I've figured out that I can download my locations as cvs file, that could be then uploaded to my website database when a location is edited or updated. But is there any way to request a json with them directly with the javascript API from within my website domain in one ajax request?
E.g. 'https://maps.googleapis.com/maps/api/place/details/json?key=MY-KEY&someOtherParam=toGetThemAll'
Thanks in advance
You can look into Google My Business API:
https://developers.google.com/my-business/content/prereqs
There is a REST endpoint to get a list of locations related to one account:
https://developers.google.com/my-business/reference/rest/v3/accounts.locations/list

How to create a google contact in "All Contacts" group using google contacts API v3?

When creating a google contact using the google contacts API v3, is there any way to specify/set the group membership for the contact to be created to "All Contacts" without actually knowing the id/href for the "All Contacts" group?
When I say "All Contacts" group, I'm referring to the default contacts group in the new google contacts UI. I think this was called "My Contacts" in the older google contacts UI.
I'm using the REST API directly and I would like to avoid making an additional REST call to get the available groups information before making the actual REST call to create the contact. Pre-fetching/caching the groups information in memory is not a feasible option since the google account for which the contact is being created is not constant, and the number of accounts this code handles is very large.
The id/href for the "All Contacts" group seems to be of the form
"http://www.google.com/m8/feeds/groups/{user-email}/base/6". Is is safe to assume this will not change without notice?

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.