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 :
    -1 get an access token from scratch (normally expects some manual interaction
using a browser to accept authentication)
    -a get an access token using the refresh_token
    -n name of a Parameter file in tables - you must specify subfolder and get the
case right eg wire/IMAPWIRE_GMAIL
    -z same as -n
    -v : version and exit

Parameter file may have the same contents as an IMAP file in tables/wire
    Note that skip-balance-group and skip-balance-queue are used by 'sffoauth' to
balance any changes to the tokens

-- TROUBLE-SHOOTING

1. 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
; 0i    18jan22  chj original version ;i 21sep22 added balance

(copyright) 2022 and previous years FingerPost Ltd.