I have created contacts using google contacts POST API. and I am successfully able to fetch them using GET API. Reference.
Now, Logged into the same google account from an android device and successfully synced contacts but the contacts which are created using POST API are not imported in sync.
Note:
Can anyone help me by telling how to resolve this issue. Thanks in advance.
You have to add the gContact:groupMembershipInfo
field in your XML request body while creating contacts in order to create contacts in My Contacts
.
Add the following in your POST
request
<gContact:groupMembershipInfo deleted="false"
href="http://www.google.com/m8/feeds/groups/userEmail/base/groupId"/>
where groupId
is 6 for My Contacts
.
You can get the GroupId for all the groups by sending an authorized GET
request to the contact groups feed URL
https://www.google.com/m8/feeds/groups/{userEmail}/full
This request wil give the detail of the Groups.
Refer this for more information Retrieving_all_contact_groups