@honkandgo/googleads

17.0.0 • Public • Published

googleads

Access Google Ads REST API (json based) from Node.js.

Install

npm -i @honkandgo/googleads

Use

import GoogleAdsClient from '@honkandgo/googleads'

const googleads = new GoogleAdsClient({
	clientId: <GOOGLE_CLIENT_ID>
	clientSecret: <GOOGLE_CLIENT_SECRET>
	developerToken: <GOOGLE_ADS_DEVELOPER_TOKEN>
	refreshToken: <REFRESH_TOKEN> (optional)
})

const { resourceNames } = await googleads.listAccessibleCustomers()

Passing refreshToken in constructor is optional. You can also pass refreshToken as a parameter to any method

const refreshToken = ...
const customerId = ...
const query = "SELECT campaign.id, campaign.name FROM campaign WHERE campaign.status IN ('ENABLED', 'PAUSED')"
const campaigns = await googleads.search(customerId, { query }, refreshToken)

Readme

Keywords

none

Package Sidebar

Install

npm i @honkandgo/googleads

Weekly Downloads

11

Version

17.0.0

License

MIT

Unpacked Size

48.4 kB

Total Files

14

Last publish

Collaborators

  • isakre
  • brajja
  • elibon
  • davvo
  • bodaniel