Skip to content

GBP Node.js SDKThe Enterprise standard.

Manage locations, menus, attributes, media, reviews, and verifications with zero-config OAuth, auto-pagination, and strict type safety.

GBP SDK Hero Image
npm install @vitabletech/gbp-sdk
πŸš€ v1.1.0 is LIVE!βœ… Native Verifications APIπŸ”— Official Chains APIπŸ” Food Menus TypesπŸ“Š v1 Performance MetricsπŸ€– Auto-Pagination Built-in!πŸš€ v1.1.0 is LIVE!βœ… Native Verifications APIπŸ”— Official Chains APIπŸ” Food Menus TypesπŸ“Š v1 Performance MetricsπŸ€– Auto-Pagination Built-in!

πŸ› οΈ What you can manage ​

πŸͺ Business Profiles

Manage accounts, fetch locations, update business hours, and handle special hours effortlessly across multiple locations.

πŸ” Services & Menus

Full support for FoodMenus and Service APIs. Build strict TypeScript menus with dietary labels, allergens, and nutritional facts.

⭐ Reviews & Posts

Reply to customer reviews, fetch metrics, and publish local posts, offers, or event updates directly to Google.

✨ Attributes & Amenities

Patch specific location attributes safely. Handle complex amenities like accessibility, dining options, and service flags.

βœ… Verifications & Chains

Trigger PIN/SMS verifications programmatically and associate your unverified locations with official global Chains.

πŸ“Έ Media Uploads

Upload photos and videos directly to Google’s v4 endpoints and manage category tags seamlessly.

πŸ’‘ Why use this SDK? ​

Instead of struggling with raw Google APIs, REST endpoints, and manual token refreshing, this SDK provides an enterprise-ready DX:

πŸ” Built-in Auth

Zero-config OAuth 2.0 flow with intelligent token refreshing and pluggable file/memory storage. Never write a token refresh loop again.

πŸ“‘ Auto Pagination

Stop writing boilerplate loops. The SDK automatically traverses nextPageToken to fetch thousands of records across pages instantly.

πŸ›‘οΈ Strict TypeScript Types

100% typed request/response bodies. Catch errors at compile time when writing food menus, attributes, or verification options.

🚦 Smart Rate Limiting

Built-in exponential backoff and automatic retry logic for 429 and 5xx errors, ensuring your enterprise workflows don't crash.

🌐 Unified Services API

We abstract away Google's fragmented APIs into a single unified client supporting locations, verifications, media, and more.


πŸš€ Quick Start in 3 Steps ​

Step 1: Install the SDK

Install via your favorite package manager.

bash
npm install @vitabletech/gbp-sdk
bash
yarn add @vitabletech/gbp-sdk
bash
pnpm add @vitabletech/gbp-sdk
Step 2: Configure OAuth

Initialize the client with your Google Cloud credentials.

typescript
import { GBPClient } from '@vitabletech/gbp-sdk';

const client = new GBPClient({
  clientId: process.env.GOOGLE_CLIENT_ID,
  clientSecret: process.env.GOOGLE_CLIENT_SECRET,
  redirectUri: 'http://localhost:3000/oauth/callback',
  refreshToken: process.env.GOOGLE_REFRESH_TOKEN, // Optional
});
Step 3: Call the SDK

You're ready! Start calling any GBP service with automatic token management.

typescript
// Fetch all locations for a specific account (auto-paginated)
const locations = await client.locations.listAll('accounts/1234567890');

// Update a location's attributes
await client.attributes.patchAttributes(locations[0].name, {
  attributes: [{ name: 'has_delivery', valueType: 'BOOL', values: [true] }],
});

πŸŽ‰ What's New in v1.1.0 ​

πŸš€ Massive API Expansion & Stable Release!

Version 1.1.0 is our official production-ready release, bringing native support for some of Google's most powerful enterprise APIs.

  • Verifications API: Trigger phone, SMS, and postcard verifications natively (mybusinessverifications.googleapis.com).
  • Chains API: Search global brands and associate your locations with corporate chains effortlessly.
  • Location Attributes: Manage location amenities, flags, and attributes easily. Check out our guide on patchAttributes vs updateLocationAttributes to choose the best method.
  • Media Upload Upgrades: The MediaService now fully supports Google's v4 endpoints and allows category updates via patch().
  • Enterprise Ready: Added comprehensive Network Whitelist documentation to help enterprise IT teams unblock necessary domains.