Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Every path ends with a slash (/campaign/get/); keep it.
  • List and object inputs on GET calls (filtering, dimensions, metrics, advertiser_ids, fields) go in the query string as JSON-encoded strings, e.g. dimensions=[“campaign_id”,“stat_time_day”].
  • Errors come back in the body: check code and message (see Appendix - Return Codes); data holds the result.
  • Advertiser ids the token can reach come from /oauth2/advertiser/get/, which needs the app id and secret and is not in this entry.
  • Writes (create, update, status changes) and asynchronous report tasks are not in this entry.

Endpoints

Get ad account info

List campaigns

List ad groups

List ads

Run a report