Socket
Book a DemoInstallSign in
Socket

google-ads-sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-ads-sdk

Comprehensive Google APIs SDK for Node.js including Ads, Gmail, Drive, Docs, Sheets, and Slides with TypeScript support

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
24
-88.29%
Maintainers
1
Weekly downloads
 
Created
Source

Google APIs SDK

Comprehensive Google APIs SDK for Node.js with TypeScript support, including Google Ads, Gmail, Drive, Docs, Sheets, and Slides.

Features

  • 🚀 Google Ads API: Complete campaign, ad group, and ads management
  • 📧 Gmail API: Send, read, and manage emails
  • 📁 Drive API: File management and sharing
  • 📄 Docs API: Create and edit Google Documents
  • 📊 Sheets API: Spreadsheet operations
  • 🎨 Slides API: Presentation management
  • 🔐 OAuth2 Authentication: Secure authentication flow
  • 📝 TypeScript Support: Full type definitions included
  • Modern API: Promise-based with async/await support

Installation

npm install google-ads-sdk

Quick Start

Google Ads

import { GoogleAdsClient } from 'google-ads-sdk';

const client = new GoogleAdsClient({
  developerToken: 'your-developer-token',
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
}, 'customer-id');

// Get campaigns
const campaigns = await client.campaigns.list();

Gmail

import { GmailClient } from 'google-ads-sdk';

const gmail = new GmailClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
});

// Send email
await gmail.messages.send({
  to: 'recipient@example.com',
  subject: 'Hello from SDK',
  body: 'This is a test email'
});

Google Drive

import { DriveClient } from 'google-ads-sdk';

const drive = new DriveClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
});

// List files
const files = await drive.files.list();

Google Docs

import { DocsClient, DocsBuilders } from 'google-ads-sdk';

const docs = new DocsClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
});

// Create document
const doc = await docs.documents.create({ title: 'My Document' });

// Add content
await docs.documents.batchUpdate(doc.documentId!, {
  requests: [
    DocsBuilders.insertTextAtStart('Hello World!')
  ]
});

Google Sheets

import { SheetsClient } from 'google-ads-sdk';

const sheets = new SheetsClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
});

// Create spreadsheet
const spreadsheet = await sheets.spreadsheets.create({
  properties: { title: 'My Spreadsheet' }
});

Google Slides

import { SlidesClient } from 'google-ads-sdk';

const slides = new SlidesClient({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
  refreshToken: 'your-refresh-token'
});

// Create presentation
const presentation = await slides.presentations.create({
  title: 'My Presentation'
});

Authentication

All services require OAuth2 authentication. You need:

  • Client ID & Secret: From Google Cloud Console
  • Refresh Token: Obtained through OAuth2 flow
  • Developer Token: Required for Google Ads API

Getting OAuth2 Credentials

  • Go to Google Cloud Console
  • Create a new project or select existing one
  • Enable the required APIs
  • Create OAuth2 credentials
  • Use the authorization flow to get refresh token

API Documentation

Requirements

  • Node.js 14+
  • TypeScript 4.5+ (for TypeScript projects)

License

ISC

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Keywords

google

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.