Modify REDIRECT_URI variable REDIRECT_URI = 'http://127.0.0.1' You can copy paste the token from the URL refer: https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback