code: public static GoogleCredential getApplicationDefaultCredential() {
      try {
        GoogleCredential credential = GoogleCredential.getApplicationDefault();
        if (credential.createScopedRequired()) {
          credential =
            credential.createScoped(Arrays.asList("https://www.googleapis.com/auth/genomics"));
        }
        return credential;
      } catch (IOException e) {
        throw new RuntimeException(MISSING_ADC_EXCEPTION_MESSAGE, e);
      }
    }
docs: Obtain the Application Default com.google.api.client.auth.oauth2.Credential
  
  @return the Application Default Credential