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="<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e396908691a3848e828a8fcd808c8e">[email protected]</a>", password="xxx", source='apps')
    groupClient.AddMemberToGroup("<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5235203d27220d3c333f3712353d3d353e3735203d2722217c313d3f">[email protected]</a>", "<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9bf5feeccee8fee9dbfcf6faf2f7b5f8f4f6">[email protected]</a>")

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!

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 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.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x