diff --git a/src/v1/text_to_speech_client.ts b/src/v1/text_to_speech_client.ts index 00cfe28b..f4d7eff5 100644 --- a/src/v1/text_to_speech_client.ts +++ b/src/v1/text_to_speech_client.ts @@ -121,6 +121,12 @@ export class TextToSpeechClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/src/v1beta1/text_to_speech_client.ts b/src/v1beta1/text_to_speech_client.ts index c63349f1..e20a5273 100644 --- a/src/v1beta1/text_to_speech_client.ts +++ b/src/v1beta1/text_to_speech_client.ts @@ -121,6 +121,12 @@ export class TextToSpeechClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes;