Hello,
I am trying to access Google Cloud resources (VMs, Storage buckets) from my project using REST APIs, for which I need OAuth2 token. I can obtain those programmatically (Java) using ADC credentials and Service Account Credentials.
The issue i run into when using ADC credentials is, that i need to re-authenticate every day using "gcloud auth application-default login" to get a new refresh_token. Otherwise, I receive "invalid_grant" error. That command needs to be run from CLI. Is there a Java SDK/REST API corresponding to the CLI command "gcloud auth application-default login" ?