I am trying to download our adsense account's spend for our reporting system. Since my tool is going to be running on a remotely hosted server and just accessing our single account, I initially I tried using a "service account". This seems to have been a dead end. That being said, it also doesn't seem appropriate to use a "web" or "installed" credential since these type of credentials require you to open up a url in a web browser... something that is not available if you are running on a remote server via ssh. Surely you can't just hit the url from another computer with a different ip address?
I also notice that it spends a lot of code parsing command line parameters, but doesn't actually seem to pass any in. What is the purpose of the command line parameter parsing.