Unable to retrieve list of accessible customers with refresh token
Hello as suggested in the documentation, anyone have any idea why this isn't working - when I use that code snippet below I get the following error:
Error: 12 UNIMPLEMENTED: GRPC target method can't be resolved.
at callErrorFromStatus (node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client.js:193:76)
at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
at /data/papaya/node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78
at processTicksAndRejections (internal/process/task_queues.js:77:11)
for call at
at ServiceClientImpl.makeUnaryRequest (node_modules/@grpc/grpc-js/build/src/client.js:161:32)
at ServiceClientImpl.<anonymous> (node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at node_modules/google-ads-node/build/src/v14/customer_service_client.js:347:29
at node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
at repeat (/data/papaya/node_modules/google-gax/build/src/normalCalls/retries.js:80:25)
at node_modules/google-gax/build/src/normalCalls/retries.js:119:13
at OngoingCallPromise.call (node_modules/google-gax/build/src/call.js:67:27)
at NormalApiCaller.call (node_modules/google-gax/build/src/normalCalls/normalApiCaller.js:34:19)
at node_modules/google-gax/build/src/createApiCall.js:112:30
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
code: 12,
details: "GRPC target method can't be resolved.",
metadata: Metadata { internalRepr: Map(0) {}, options: {} },
note: 'Exception occurred in retry method that was not classified as transient'
}
const client = new GoogleAdsApi({
client_id: "<CLIENT-ID>",
client_secret: "<CLIENT-SECRET>",
developer_token: "<DEVELOPER-TOKEN>",
});
const refreshToken = "<REFRESH-TOKEN>";
const customers = await client.listAccessibleCustomers(refreshToken);
I am also experiencing this issue.
I can't reproduce this.
If you've fixed it please post what you did so it's logged.
If it's still a problem please confirm otherwise I'll close this issue.
same issue here, tried with and without customer_id, login_customer_id and linked_customer_id (I have to use login + linked in another app (Rust))
const client = new GoogleAdsApi({
client_id: GOOGLE_CLIENT_ID,
client_secret: GOOGLE_CLIENT_SECRET,
developer_token: GOOGLE_ADS_DEVELOPER_TOKEN,
});
const customer = client.Customer({
customer_id: GOOGLE_ADS_CUSTOMER_ID,
refresh_token: GOOGLE_CLIENT_REFRESH_TOKEN,
login_customer_id: GOOGLE_ADS_LOGIN_ID,
linked_customer_id: GOOGLE_ADS_LINKED_ID,
});
const result = await customer.query(`SELECT here`);
-> Error: 12 UNIMPLEMENTED: GRPC target method can't be resolved.
Fixed for me: my configuration was incorrect; also I only needed the customer_id and refresh_token, no other id's.