customer id could not be inferred from the request or caller identity.
AlertCenter Quickstart
Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "customer id could not be inferred from the request or caller identity.", "reason" : "badRequest" } ], "message" : "customer id could not be inferred from the request or caller identity.", "status" : "INVALID_ARGUMENT" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:150) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:443) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1092) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:541) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:474) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:591) at AdminSDKAlertCenterQuickstart.main(AdminSDKAlertCenterQuickstart.java:86)
Running into the same thing trying to authenticate over Rest directly.
Just a heads up. My fix for this.
I was using the service account ID when creating my JWT token instead of the admin account ID. When I switched those, everything seemed to work correctly.
Hi @joey-mcadams, I am facing the same issue, Shall I use the previous version of google-api-services-alertcenter to get the alert center events.