S
S
shdprogrammer2015-04-26 23:44:46
Google
shdprogrammer, 2015-04-26 23:44:46

How to move a contact to another group in google contacts?

Good day to all. Can't move contact in google contacts to another group. Example from documentation:

def add_group_membership(gd_client, contact_url, group_atom_id):
    contact = gd_client.GetContact(contact_url)
    contact.group_membership_info.append(contactsdata.GroupMembershipInfo(href=group_atom_id))
    try:
        updated_contact = gd_client.Update(contact)
        return updated_contact
    except gdataclient.RequestError, e:
        print_exc()
        if e.status == 412:
            pass
    return None

contact_url like https://www.google.com/m8/feeds/contacts/{{email}}...
group_atom_id like https://www.google.com/m8/feeds/groups/{{email}}/ full/6
In response I get:
RequestError: Server responded with: 400, <?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
 <error>
  <domain>GData</domain>
  <code>invalid</code>
  <internalReason>Group membership information not supported.</internalReason>
 </error>
</errors>

Google, everywhere people ask similar questions using urls like http://www.google.com/m8/feeds/contacts/{{email}}/base , which they are advised to change to https://www.google.com/m8 /feeds/contacts/{{email}}... But I already use the latter.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question