Re: KeyError: 'refresh_token' error in fetchmail-oauth2

Kamil Jońca <[email protected]> Mon, 28 Mar 2022 06:13:33 +0200
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
Marco Gaiarin <[email protected]> writes:

> 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.

Stupid question:
Have you pasted url to your browser?
--8<---------------cut here---------------start------------->8---
https://accounts.google.com/o/oauth2/auth?client_id=<reducted>
--8<---------------cut here---------------end--------------->8---
and then pasted reply ?

KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/