npm packages for calling Google Cloud services from Node.js with idiomatic helpers. Authentication uses Application Default Credentials or service account JSON via environment variables.
Overview
Google Cloud Node.js Client Libraries provide JavaScript modules for interacting with individual Google Cloud Platform services from Node applications. Each package on npm maps to a product API, and they are preferred over the legacy google-api-nodejs-client REST layer when a dedicated client exists.
Before calling a service, its API must be enabled for the Google Cloud project; each library points to the enablement steps for that API. Authentication flows through google-auth-library-nodejs, typically by setting GOOGLE_APPLICATION_CREDENTIALS to a downloaded service account JSON file that should be stored securely and kept out of source control.
The collection follows semantic versioning with stable and preview quality levels. Client versions align with supported Node.js release schedules, including optional legacy dist-tags for older Node runtimes, though maintainers recommend current LTS versions.
Tutorials cover Cloud Run, Kubernetes Engine, session handling, background jobs with Pub/Sub, and telemetry in client libraries, reflecting common deployment targets for Node workloads on GCP.
Key features
- Per-service npm packages
- Application Default Credentials flow
- Service account JSON environment variable
- google-auth-library-nodejs integration
- Stable and preview library tiers
- Semantic versioning for releases
- Legacy Node support via npm dist-tags
- API enablement steps per service
Use cases
- Node web apps using Cloud Datastore
- Cloud Run services with GCP clients
- Background workers with Pub/Sub
- Todo and sample apps on App Engine
- Key-value patterns on Datastore