summarylogtreecommitdiffstats
path: root/get-gmail-token
diff options
context:
space:
mode:
Diffstat (limited to 'get-gmail-token')
-rwxr-xr-xget-gmail-token5
1 files changed, 5 insertions, 0 deletions
diff --git a/get-gmail-token b/get-gmail-token
new file mode 100755
index 000000000000..3c27502b8c24
--- /dev/null
+++ b/get-gmail-token
@@ -0,0 +1,5 @@
+#!/usr/bin/bash
+
+user="myemail@mydomain.com"
+access_token=$(getmail-gmail-xoauth-tokens /path/to/gmail.json)
+echo -ne "user=$user\001auth=Bearer $access_token\001\001"| base64 -w0