I have a service account and want to share its credentials to the api.
I tried https://developers.google.com/identity/protocols/oauth2/service-account , but it seems like import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
is deprecated.
Is the java quickstart credentials supposed to be an alternative to the import? I'm not exactly sure how to get credentials passed in.
Sheets service = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))
.setApplicationName(APPLICATION_NAME)
.build();