Skip to content

Unable to retrieve list of accessible customers with refresh token #499

@DrewHang

Description

@DrewHang

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions