Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customer id could not be inferred from the request or caller identity. #105

Open
amjf10 opened this issue Jun 20, 2020 · 3 comments
Open

Comments

@amjf10
Copy link

amjf10 commented Jun 20, 2020

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)

@joey-mcadams
Copy link

Running into the same thing trying to authenticate over Rest directly.

@joey-mcadams
Copy link

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.

@usundarj
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants