google-ads-api 25.1.0-beta.1 → 25.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -68,12 +68,12 @@ import { GoogleAdsApi } from "google-ads-api";
68
68
  const client = new GoogleAdsApi({
69
69
  client_id: "<CLIENT-ID>",
70
70
  client_secret: "<CLIENT-SECRET>",
71
- developer_token: "<DEVELOPER-TOKEN>",
72
71
  });
73
72
  ```
74
73
 
75
74
  Optional client settings:
76
75
 
76
+ - `developer_token`: no longer needed. Google sunset developer tokens on 9 September 2026; API access levels now belong to the Google Cloud project that owns your OAuth client, and the API ignores the token. When it is unset or empty, no `developer-token` header is sent. Existing configurations that pass a token keep working until Google starts rejecting the header in a future major API version.
77
77
  - `grpc_channel_options`: [gRPC channel options](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js#supported-channel-options) applied to every service client this instance creates, for example `{ "grpc.keepalive_time_ms": 30000, "grpc.keepalive_timeout_ms": 10000 }`. Cached service clients are keyed by client id, refresh token and these options, so instances with different options never share a client.
78
78
  - `max_reporting_rows`: throw once a report or query returns more rows than this.
79
79
  - `disable_parsing`: return raw API responses instead of parsed rows.
@@ -107,7 +107,6 @@ This is a special client method for listing the accessible customers for a given
107
107
  const client = new GoogleAdsApi({
108
108
  client_id: "<CLIENT-ID>",
109
109
  client_secret: "<CLIENT-SECRET>",
110
- developer_token: "<DEVELOPER-TOKEN>",
111
110
  });
112
111
 
113
112
  const refreshToken = "<REFRESH-TOKEN>";
@@ -721,3 +720,11 @@ try {
721
720
  8. Test with `yarn test`.
722
721
  9. Test by linking to a real project and making some real requests.
723
722
  10. Once confident, bump the major version & publish to NPM.
723
+
724
+ # About Opteo
725
+
726
+ This library is developed and maintained by [Opteo](https://opteo.com), the Advertising Efficiency Manager (AEM) for paid media teams working across Google Ads, Meta Ads, Microsoft Advertising, LinkedIn Ads and TikTok Ads.
727
+
728
+ Opteo brings together live account data, business context, skills, and specialist marketing tools in one workspace. Connect your marketing accounts, analyse your data with professional-grade tools, build expert marketing agents, and implement changes that increase ROAS.
729
+
730
+ Learn more about [Opteo](https://opteo.com).
@@ -6,7 +6,13 @@ import { services } from "./protos/index.js";
6
6
  export interface ClientOptions {
7
7
  client_id: string;
8
8
  client_secret: string;
9
- developer_token: string;
9
+ /**
10
+ * Optional since the Google Ads API moved access levels from developer
11
+ * tokens to Google Cloud projects (September 2026). When unset or empty,
12
+ * no `developer-token` header is sent. The API ignores the value when it is
13
+ * present and will reject the header in a future major version.
14
+ */
15
+ developer_token?: string;
10
16
  disable_parsing?: boolean;
11
17
  max_reporting_rows?: number;
12
18
  grpc_channel_options?: grpc.ChannelOptions;
@@ -5,7 +5,7 @@ import { Hooks } from "./hooks.js";
5
5
  import TTLCache from "@isaacs/ttlcache";
6
6
  export declare const FAILURE_KEY = "google.ads.googleads.v25.errors.googleadsfailure-bin";
7
7
  export interface CallHeaders {
8
- "developer-token": string;
8
+ "developer-token"?: string;
9
9
  "login-customer-id"?: string;
10
10
  "linked-customer-id"?: string;
11
11
  }
@@ -84,9 +84,12 @@ class Service {
84
84
  };
85
85
  }
86
86
  get callHeaders() {
87
- const headers = {
88
- "developer-token": this.clientOptions.developer_token,
89
- };
87
+ const headers = {};
88
+ // Omitted rather than sent empty: the API rejects an empty developer-token
89
+ // header (DEVELOPER_TOKEN_PARAMETER_MISSING) but accepts a missing one.
90
+ if (this.clientOptions.developer_token) {
91
+ headers["developer-token"] = this.clientOptions.developer_token;
92
+ }
90
93
  if (this.customerOptions.login_customer_id) {
91
94
  headers["login-customer-id"] = this.customerOptions.login_customer_id;
92
95
  }
@@ -6,7 +6,13 @@ import { services } from "./protos/index.js";
6
6
  export interface ClientOptions {
7
7
  client_id: string;
8
8
  client_secret: string;
9
- developer_token: string;
9
+ /**
10
+ * Optional since the Google Ads API moved access levels from developer
11
+ * tokens to Google Cloud projects (September 2026). When unset or empty,
12
+ * no `developer-token` header is sent. The API ignores the value when it is
13
+ * present and will reject the header in a future major version.
14
+ */
15
+ developer_token?: string;
10
16
  disable_parsing?: boolean;
11
17
  max_reporting_rows?: number;
12
18
  grpc_channel_options?: grpc.ChannelOptions;
@@ -5,7 +5,7 @@ import { Hooks } from "./hooks.js";
5
5
  import TTLCache from "@isaacs/ttlcache";
6
6
  export declare const FAILURE_KEY = "google.ads.googleads.v25.errors.googleadsfailure-bin";
7
7
  export interface CallHeaders {
8
- "developer-token": string;
8
+ "developer-token"?: string;
9
9
  "login-customer-id"?: string;
10
10
  "linked-customer-id"?: string;
11
11
  }
@@ -44,9 +44,12 @@ export class Service {
44
44
  };
45
45
  }
46
46
  get callHeaders() {
47
- const headers = {
48
- "developer-token": this.clientOptions.developer_token,
49
- };
47
+ const headers = {};
48
+ // Omitted rather than sent empty: the API rejects an empty developer-token
49
+ // header (DEVELOPER_TOKEN_PARAMETER_MISSING) but accepts a missing one.
50
+ if (this.clientOptions.developer_token) {
51
+ headers["developer-token"] = this.clientOptions.developer_token;
52
+ }
50
53
  if (this.customerOptions.login_customer_id) {
51
54
  headers["login-customer-id"] = this.customerOptions.login_customer_id;
52
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "google-ads-api",
3
- "version": "25.1.0-beta.1",
3
+ "version": "25.1.1-beta.0",
4
4
  "description": "Google Ads API Client Library for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "@isaacs/ttlcache": "^1.4.0",
28
28
  "axios": "^1.6.7",
29
29
  "circ-json": "^1.0.4",
30
- "google-ads-node": "25.1.0-beta.1",
30
+ "google-ads-node": "25.1.0",
31
31
  "google-auth-library": "^11.0.2",
32
32
  "google-gax": "^6.3.0",
33
33
  "long": "^4.0.0",