I'm doing a spring project that allows me to use the gmail api to send and read emails from my app. On my local PC when I use the app for the first time, it redirects me to the google page and I select the account with which I want to connect, then a file is downloaded to my pc and with that I can connect. The problem arises when I upload my app to the Ubuntu server, it has no graphical environment but console mode, therefore I can not enter the google page from there and if I try to use the downloaded file on my pc the server does not work. Is there any way to use the api without downloading that file or some other way to download the file on ubuntu?