KeyError: 'refresh_token' error in fetchmail-oauth2

Marco Gaiarin <[email protected]> Sun, 27 Mar 2022 22:22:36 +0200
Newsgroups gmane.mail.fetchmail.user
Organization Il gaio usa sempre TIN per le liste, fallo anche tu!!!
Message-ID <[email protected]>
I'm trying to configure oAuth2 access to GMail (consumer account); i think
i've done correctly all the stuff needed, i open the browser page, auth,
get the verification code, paste the verification code and:

 irene@eraldo:~$ fetchmail-oauth2 -c .oauth2.conf --obtain_refresh_token_file
 To authorize token, visit this url and follow the directions:
   https://accounts.google.com/o/oauth2/auth?client_id=<reducted>
 Enter verification code: <reducted>
 Traceback (most recent call last):
   File "/usr/bin/fetchmail-oauth2", line 567, in <module>
     main(sys.argv)
   File "/usr/bin/fetchmail-oauth2", line 503, in main
     newRefTok = response['refresh_token']
 KeyError: 'refresh_token'

What i'm doing wrong?! Thanks.

-- 
  Solo una sana e consapevole libidine
  salva il giovane dagli SCOUT e dall'Azione Cattolica!
						(Zucchero, circa O;-)