sffoauth
sffoauth
Request a new access_token using an existing refresh_token
(note access_tokens are required to view/mod/zap data but are seldom valid for
more than 1 hour)
sffoauth -z wire/IMAP.GMAIL.OAUTH -c gmail_dotdot_feb17.json -t sff_dotdot -a
-D | tee /tmp/sffoAccess-x
Initial build - generate both refresh AND access (Manual process)
sffoauth -z wire/IMAP.GMAIL.OAUTH -c gmail_dotdot_feb17.json -t sff_dotdot -1
-D | tee /tmp/sffoInit-x
Just checking - not much
sffoauth -z wire/IMAP.GMAIL.OAUTH -c gmail_dotdot_feb17.json -t sff_dotdot -k
-D | tee /tmp/sffoChk-x
Input switches :
either
-1 : get an access token from scratch (normally expects some manual
interaction using a browser to accept authentication)
or
-a : get an access token using the refresh_token
others :
-D : display the transactions
-n : name of a Parameter file in tables - you must specify subfolder and get
the case right eg wire/IMAPWIRE_GMAIL
-w : flavor/flavour - Google (for Gmail) - default - or Microsoft (for
Office365)
or use parameter "oauth-flavour:microsoft" or "oauth-flavor:google"
-z : same as -n
-v : version and exit
Parameter file may have the same contents as an tables/wire/(IMAP) file or
tables/mail/(SMTP) file
Note that skip-balance-group and skip-balance-queue are used by 'sffoauth' to
balance any changes to the tokens
-- TROUBLE-SHOOTING
1. Google - refresh_token is zapped/disappears/is invalid
- log into the Google Console for the Logon
- second tab : https://myaccount.google.com/data-and-privacy
- scroll down to 3rd party apps with account access
REVOKE access to this particular App only
- Cmd window - follow the instructions for generating a new refresh-token
Version Control
; 0k 18jan22 chj original version ;i 21sep22 added balance ;jk 20dec22 added
MS Office365 as a flavour
(copyright) 2023 and previous years FingerPost Ltd.