哪个 API 更改 Google 组自动消息设置?

Which API to change Google group auto-message settings?

我正在尝试通过他们的 API 之一更改我公司 google 帐户中 google 群组的自动回复消息(这些消息需要自动打开和关闭)。

我用过group settings api to change other settings on the group, but the message settings (among many others) don't appear to be part of that API

是否还有另一个 API 用于更改组设置?

目前没有 API 设置来修改群组自动回复。必须通过网络更改 UI.

我今天找到了这个。 --我没试过--我试过了,这对我来说对群组电子邮件不起作用。

https://developers.google.com/gmail/api/guides/vacation_settings

我试试

aemail = "group email"
adescription = "something else"
scopes = ['https://www.googleapis.com/auth/gmail.settings.basic']
credentials = ServiceAccountCredentials.from_json_keyfile_name(
    'p--cut--2.json', scopes)
delegated_credentials = credentials.create_delegated(aemail)
http_auth = delegated_credentials.authorize(Http())

service = build('gmail','v1', http=http_auth)

vacation_settings = {
    'enableAutoReply': True,
    'responseBodyHtml': adescription,
    'restrictToDomain': restrictToDomain,
}

result = service.users().settings()\
        .updateVacation(userId='me', body=vacation_settings).execute()

pprint.pprint(result)