I am running a python script on my raspberry pi, via ssh. I use the google oauth library to fetch events from google calendar, but I have problems with the authentication.
When I run the program on my main computer (which has a GUI and a web browser), it works as expected, but not on my Pi. I am running the program with the flag --noauth_local_webserver because of that there exists no web browser on the Pi. Instead I get a link to click on but when I do that, google answers with the redirect_uri_mismatch error. I am running this locally at home, but it works on my main computer so I cannot figure out what is wrong. Any suggestions?
Ok, so I found the answer! 
The problem is that if the registred application is set to web application in the google developer console settings, this is the error message you will get. To solve this I just changed the type to desktop application instead.
Redirect error when using google oauth and the flag --noauth_local_webserver