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

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?

Related

Geocoding From Google Sheets Data

I have a Google Form where I'm taking inputs from my high school classmates & teachers to buildup a google map where I'll make a "Network Map"(as I call it). I've 2 columns in the connected Spreadsheet named as "District" and "Thana" (in Bangladeshi format).
I need to merge those 2 columns into a new one named "Full Adress", then I need to Geocode this column to get an approximately correct location of my schoolmates or teachers. Also, I need to share the created map with the respondents of my "Google Forms" so that they can see that map easily from their "Google Map" app in any kinds of device.
I don't know how to geocode or I don't have any idea about it.
Can I get some important resources/platforms to do this task efficiently without paying anything?
(Special note: I have to handle about 2k+ data in that Sheet.)
In addition to #My Routes' answer and to set the correct expectation, the Maps for Sheets should accomplish your Geocoding problems (as mentioned by #My Routes). But please keep in mind that you should use an API key that associated in to a project that has an active billing account. This is not a free service but once you enable billing, you are given free $200 monthly credits.
To learn more about the product's pricing, please check out Google Maps Platform APIs pricing.

Google Contacts API V3 not returning title for automatic contact entries

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.

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 :)

How to add multiple locations in google map for one company?

I have multiple addresses, I need google maps to point to all the locations of my company. How can I add these locations in google map for my company?
Google allows and accepts multiple locations for single business.
Go to: https://www.google.com/local/manage/
Login to your official G-mail ID, It asks for user agreement. Accept it.
There you get a pop-up saying to import the business location in the below format and the business name.
https://docs.google.com/spreadsheet/ccc?key=0AtAMaLBhiYxedHRucWhlVUxNZ0QwOUJJSDFwbDRkd2c&&&_ga=1.41747554.1560354154.1443733879#gid=0
Import and verify the address to get listed in the Google Business Places

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.