[ad_1]
the thing is the following.
I’m trying to make a request in golang client.AnnotateVideo(ctx, &annotateVideoRequest) to the Google Cloud Video Intelligence Api, using the package https://cloud.google.com/go/videointelligence apiv1.
I noticed that if i’m on a GoogleVM, i don’t need any credentials, or environment variable, because the API says:
For API packages whose import path is starting with “cloud.google.com/go”,
such as cloud.google.com/go/storage in this case, if there are no credentials
provided, the client library will look for credentials in the environment.
But i guess i can’t authenticate because i’m running a Docker Container inside the googleVM, and i don’t know if i really need a credentials file in that docker container, because i don’t know if the library automaticlly creates a credentials file, or it just check if there is a $GOOGLE_APPLICATION_CREDENTIALS
and then use then (but that will be a little bit weird, because it makes no sense – i’m on a GOOGLE VM, and i supossed to have that permissions).
The error is:
PermissionDenied: The caller does not have permissions
Some links that might be helpful:
https://pkg.go.dev/cloud.google.com/go/storage
https://cloud.google.com/docs/authentication#environment-service-accounts
https://cloud.google.com/docs/authentication/production#auth-cloud-implicit-go
https://cloud.google.com/video-intelligence/docs/common/auth#adc
Thanks in advance!
[ad_2]