Gmail api authentication


I’m trying to follow this tutorial (Python Quickstart  |  Gmail API  |  Google Developers) to access the gmail api from my glitch project. It does send me a URL to log into my gmail account and I am able to get to the page to allow the api access. After clicking the allow button I get the a site cannot be reached error (ERR_CONNECTION_REFUSED) and it does not create the token.json file.

ERR_CONNECTION_REFUSED often means the site is blocked on your internet or you are having internet issues. If you are ok with sharing, what country are you from?

I am in California. I thought this might be an issue with my work computer but I tried it on my personal computer and got the same response.