google-ads-api 25.1.0 → 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 +1 -2
- package/build/cjs/client.d.ts +7 -1
- package/build/cjs/service.d.ts +1 -1
- package/build/cjs/service.js +6 -3
- package/build/esm/client.d.ts +7 -1
- package/build/esm/service.d.ts +1 -1
- package/build/esm/service.js +6 -3
- package/package.json +1 -1
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>";
|
package/build/cjs/client.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/build/cjs/service.d.ts
CHANGED
|
@@ -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"
|
|
8
|
+
"developer-token"?: string;
|
|
9
9
|
"login-customer-id"?: string;
|
|
10
10
|
"linked-customer-id"?: string;
|
|
11
11
|
}
|
package/build/cjs/service.js
CHANGED
|
@@ -84,9 +84,12 @@ class Service {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
get callHeaders() {
|
|
87
|
-
const headers = {
|
|
88
|
-
|
|
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
|
}
|
package/build/esm/client.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/build/esm/service.d.ts
CHANGED
|
@@ -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"
|
|
8
|
+
"developer-token"?: string;
|
|
9
9
|
"login-customer-id"?: string;
|
|
10
10
|
"linked-customer-id"?: string;
|
|
11
11
|
}
|
package/build/esm/service.js
CHANGED
|
@@ -44,9 +44,12 @@ export class Service {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
get callHeaders() {
|
|
47
|
-
const headers = {
|
|
48
|
-
|
|
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
|
}
|