I am trying to use VertexAIGeminiChat module in my spring boot app, but when I use a service account json file in credentialsUri, I get this error:
UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project
Adding the following property to application.properties file fixed the issue:
spring.ai.vertex.ai.gemini.transport=rest