Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#1) on https://console.developers.google.com/ register project, enable Groups Migration API, and create OAuth2 credentials.
#2) set the client_id and client_secret variables below to the values provided when creating the OAuth2 credentials.
#3) make copies of the Client ID and Client Secret for the OAuth2 credentials and use them
client_id="..."
client_secret="...."
#4) get authorization code at the following link using web browser
# (make sure you sign in with an account that has access to Google Groups you are importing to).