Using "google_api_secret_manager" Library to access secrets in GCP

I’m trying to user the Lib : “google_api_secret_manager” but there are no example provided so I installed the Lib and find the function that I need to use :

“secretmanager_projects_secrets_get” to access the secret in the module “GoogleApi.SecretManager.V1.Api.Projects”.

secretmanager_projects_secrets_get(connection, projects_id, secrets_id, optional_params \ [], opts \ [])

Now, I’m stuck with the first argument “connection”, in the docs : * connection (type: GoogleApi.SecretManager.V1.Connection.t) - Connection to server

Here is the module : GoogleApi.SecretManager.V1.Connection — google_api_secret_manager v0.19.0
I didn’t understand what should I pass there ?

Usually we use a service account to authentify applications in google apis (in nodejs for example), is this the case here ? or I’m using the wrong library ?

Those generated google lib are a bit painfull to use I recommand you to try to understand what call you need what kind of token and check samples in more mainstream langage (python, nodejs…) then read the source code off the generated elixir lib.
I wrote an article how to upload video on youtube with elixir

Yeah whenever I need to interact with a Google API I just write a JSON API client to do it. Google has good documentation on how the JSON endpoints work, luckily.