This python script demonstrates how to download the email archives
for all subgroups of a groups.io group using their API. This will
download each subgroup's email archives into a separate .mbox file
in the mboxes/
directory. This write-to-disk step is not strictly
necessary, as the mbox file is contained in a zip file in memory.
To run this, you need a Groups.io secret token. Provide this to the script using an environment variable:
GROUPSIO_SECRET_TOKEN="XYZ" python get_mbox_archives.py