gmail-apigoogle-admin-sdkgoogle-api-python-client

Google python API for Admin Console Spam policies


I looked all over the internet and didn't find the relevant Python API for the settings in the following image in Google Admin Console: Admin Console - Gmail - Spam, phishing and malware settings

I'm trying to modify Spam rules and Email allowlist over API.

Thanks!

I looked all over Google's API docs


Solution

  • The thing with the Gmail API is that their scope of feature is more oriented to what you have in the gmail.com web UI; like working with labels, drafts, delegated inbox, etc. The Admin console Gmail settings are extremely limited and the SPAM rules are not included, just as a reference you can review this link with the available Admin console settings through API here

    On the other hand, having the ability to manage the Gmail settings through API for Google Workspace would be extremely helpful for automating tasks. If you can spare the time, please consider submitting a Feature Request to Google developers for further enhancements to the Admin SDK (Feel free to share it here if you send it. I'd love to add my +1 to this!)

    References