Reputation: 37509
I'm trying to change the auto-response messages for a google group in my company's google account via one of their API's (these messages need to be turned on and off automatically).
I've used the 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.
Is there another API for changing group settings?
Upvotes: 0
Views: 259
Reputation: 190
I find this today. --I've not try-- I've try and this not work for me for a group email.
https://developers.google.com/gmail/api/guides/vacation_settings
I try something like
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)
Upvotes: 1
Reputation: 13528
There is currently no API setting to modify Groups auto-responder. It must be changed via the web UI.
Upvotes: 2