Google Groups API添加成员 [英] Google Groups API add Member

查看:111
本文介绍了Google Groups API添加成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在互联网上找到了很多有关将成员添加到Googlegroups中的网上论坛的信息,但是我无法设法使其中的任何一个工作.

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.

我正在使用Python-DJango.

I am working in Python-DJango.

我使用业务帐户设法通过Provisioning API添加了它们,但是我无法使用新的Directory API来添加它们.

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

问题是我想加人的群组不是业务群组,而是普通的googlegroups:

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

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")

我想知道我必须在domain字段中输入什么.有了企业帐户,它就是企业领域,但是我不确定是普通的googlegroups还是一个.我已经尝试过googlegroups.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.

任何帮助将不胜感激

谢谢!

推荐答案

Provisioning API(不建议使用)和新的Admin SDK均旨在与Google Apps for Business和EDU配合使用,并且仅适用于Google Groups for Business(组带有自定义的@ yourdomain.com地址).

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

您不能将这些API用于具有@ googlegroups.com电子邮件地址的消费者Google网上论坛.对于这些组,您唯一的选择是通过Web界面管理成员资格.

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.

这篇关于Google Groups API添加成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆