Hi,
We have provided multiple auth flows [1] that are suited for different types of applications. In your case, you would want to use the Service Account auth flow [2], which allows authorizes your application to access data that's owned by itself, not end users. Service account flow doesn't involve browsers.
If you really want to access user's data, with the consent from the user of course, you may still use Installed Application flow, but in your case, you will use the AbstractPromptReceiver [3], which allows you to copy/paste a auth code into a console (e.g. ssh). Hopefully you need to do this only once if you've given a data store instance.
For example:
class MyVerificationCodeReceiver extends AbstractPromptReceiver {
...
}
new AuthorizationCodeInstalledApp(flow, new MyVerificationCodeReceiver()).authorize("user")