'Google Groups API add Member

I have found lots of information on the internet about adding Members to a Group in Googlegroups, but I cant manage to get any of it to work.

I am working in Python-DJango.

Using a bussiness account, I manage to add them using Provisioning API, but I could not do it with the new Directory API.

The problem is the group I want to add people to is not a business one, it's an ordinary googlegroups one:

[email protected]

From what I have found, and what I did for the business group I have the following code:

    groupClient = gdata.apps.groups.client.GroupsProvisioningClient(domain=domain)
    groupClient.ClientLogin(email="[email protected]", password="xxx", source='apps')
    groupClient.AddMemberToGroup("[email protected]", "[email protected]")

I wanted to know what I have to put in the domain field. With the business account it was the business domain, but being a normal googlegroups one I am not sure. I have tried googlegroups.com and doesn't work, as I always get a invalid domain error.

Any help would be appreciated

Thanks!



Solution 1:[1]

The Provisioning API (deprecated) and the new Admin SDK are both designed to work with Google Apps for Business and EDU and only work against Google Groups for Business (groups with a custom @yourdomain.com address).

You cannot use these APIs with consumer Google Groups that have @googlegroups.com email addresses. For these groups, your only option is to manage membership via the web interface.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jay Lee