Skip to content

Instantly share code, notes, and snippets.

View CodeAdminDe's full-sized avatar

Frederic Roggon CodeAdminDe

  • Hamburg, Germany
View GitHub Profile
@phlbnks
phlbnks / gmail_oauth.sh
Created January 31, 2023 23:12
Script to generate OAuth token file for use with Google API, specifically with parsedmarc / dmarc-visualizer
#!/bin/bash
# Injest / setup vars // TODO: error handling needed
client_id=$( cat parsedmarc/credentials.json | jq -r '.installed.client_id' )
client_secret=$( cat parsedmarc/credentials.json | jq -r '.installed.client_secret' )
scope="https://www.googleapis.com/auth/gmail.modify"
echo
echo "This script will take your OAuth Desktop Application credentials.json and use it to get a token to interact with the API"
sleep 2