1

I'm trying to change the "spamModerationLevel" parameter on all groups (~375 groups) on my company's google mail, and am struggling with the script i use.

I have managed to get the list of groups with a script inspired from this doc. What I can't do, however, is update the required parameter.

body={'spamModerationLevel': 'ALLOW'}
editResult=service.groups().update(groupKey=*groupID*, body=body).execute()

This request doesn't return any error, but the moderation level isn't updated. If I change the body of the request to something like

body={'description': 'test2'}

The request runs fine, and the group's description is updated.

Is there anything I missed? Using the API Explorer here, I can change any parameter I want, so I assume I should be able to do so in a script.

Herz
  • 11
  • 3

0 Answers0