Google Groups API add Member

…衆ロ難τιáo~ 提交于 2019-12-02 00:42:25

问题


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:

group_name@googlegroups.com

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="user@gmail.com", password="xxx", source='apps')
    groupClient.AddMemberToGroup("group_name@googlegroups.com", "newUser@gmail.com")

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!


回答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.



来源:https://stackoverflow.com/questions/21253849/google-groups-api-add-member

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!