Vitali Melamud
Vitali Melamud

Reputation: 1397

GCP - GoogleCredential vs GoogleCredentials

I'm creating GPC clients for BigQuery & Transfer API, using GCP Java API. To each client I need to initiate different type of credentials -

GoogleCredential javadoc - for Transfer API

GoogleCredentials javadoc - for BigQuery

Is there a convenient way to convert between the two so I won't need to manage reading two types of credentials?

Also - could anyone reason why there was a need for these two types?

Upvotes: 6

Views: 2707

Answers (1)

You can use a HttpCredentialsAdapter to use the more recent GoogleCredentials with the Google API Client Libraries for Java.

I don't know of a way to do the reverse transformation, i.e., generate a GoogleCredential from GoogleCredentials.

Upvotes: 11

Related Questions