We are encountering authentication issues while trying to access the Google Vertex AI API.
Below are the steps we have taken in our production environment and the corresponding issue.We have verified the service account roles, key file integrity, and environment variable configurations but are unable to resolve the issue. We would appreciate your guidance on resolving this problem
During the API call, we received the following error:
Can you try making another Json Key ? (Or an SA) for troubleshooting. Also can you try logging in with the gcloud command:
gcloud auth application-default login
works, thanks
We attempted to introduce new json keys, yet encountered the same problems. Logging in with gcloud auth application-default login proceeds without issues, but we continue to receive the same error message.
I have the same problem. We assigned the following roles to the service account:
Do we need to assign any other or what are we doing wrong ?
Did you resolve the issue? I have the same problem
I have the same problem, any news?
Actually I did.
In my case (at least) the problem was that the scopes were not specified during the GoogleCredential initialization.
This is how it looks like in my case:
@Lazy
GoogleCredentials googleCredentials() throws IOException {
return GoogleCredentials.fromStream(new ClassPathResource(this.config.getCredential().getPath()).getInputStream())
.createScoped("https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only");
}
I hope this will help to you as well.
Hello ,
I had the same problem as you .
I resolved it as following :
run the following command (either on gcp (the website) cloud shell or on your local cloud shell) and then you will have a json to download , once downloaded , replace "account" field by any of your services account and make in it all the needed permissions for you use of vertexAI.
And boom it's done :D, don't hesitate to reach me by mail if you need any details "(PII Removed by Staff)".
best,
gcloud auth application-default login
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |