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

"login-customer-id" error message #906

Open
patreeceeo opened this issue Feb 8, 2025 · 5 comments
Open

"login-customer-id" error message #906

patreeceeo opened this issue Feb 8, 2025 · 5 comments
Labels
question Further information is requested

Comments

@patreeceeo
Copy link

What is your question?

I'm trying to run the add campaigns example with a test customer account.

I'm getting an error with message "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid".

I read the page linked by the above message, but I'm still confused. There's no information about how to provide the login customer ID. I'm also confused as to whether the login customer ID should be the manager account ID, or the regular test account ID.

Thanks in advance.

@patreeceeo patreeceeo added the question Further information is requested label Feb 8, 2025
@patreeceeo
Copy link
Author

Copilot chat also seems flummoxed.

@patreeceeo
Copy link
Author

Here's the customer (manager account?) ID I'm using: 728-044-7900.

@VenkatVVV
Copy link

I'm also having the same issue, the account i'm trying to use is also the manager account so i'm unsure as to why i'm getting this error.

I'm initializing my Google Ads Client from loading from dictionary so I include "login_customer_id" as a key with the account_ID as the value

I'm still receiving the SAME error however...

INFO:google.ads.googleads.client:Request

Method: /google.ads.googleads.v17.services.GoogleAdsService/SearchStream
Host: googleads.googleapis.com
Headers: {
"developer-token": "REDACTED",
"x-goog-api-client": "gl-python/3.11.6 grpc/1.63.0 gax/2.19.0 gccl/25.0.0 pb/4.25.3",
"x-goog-request-params": "customer_id=8220"
}
Request: customer_id: "82
20"
query: "\n SELECT segments.date, campaign.name, metrics.cost_micros \n FROM campaign_budget \n WHERE segments.date >= 20250101 and segments.date <= 20250128\n "

Response

Headers: {
"google.ads.googleads.v17.errors.googleadsfailure-bin": "\n\u0001\n\u0002H\u0002\u0012\u0001User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid\u0012\u0016SFA6nCvlNPDfyep6QHXLZA",
"grpc-status-details-bin": "\b\u0007\u0012#The caller does not have permission\u001a\u0002\nDtype.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure\u0012\u0002\n\u0001\n\u0002H\u0002\u0012\u0001User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid\u0012\u0016SFA6nCvlNPDfyep6QHXLZA",
"request-id": "SFA6nHXLZA"
}
Fault: errors {
error_code {
authorization_error: USER_PERMISSION_DENIED
}
message: "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
}
request_id: "SFA6n
HXLZA"

WARNING:google.ads.googleads.client:Request made: ClientCustomerId: 82******20, Host: googleads.googleapis.com, Method: /google.ads.googleads.v17.services.GoogleAdsService/SearchStream, RequestId: SFA6nCvlNPDfyep6QHXLZA, IsFault: True, FaultMessage: User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid

@patreeceeo
Copy link
Author

FWIW, I switched from using a test account to a real account and this error went away (only to be replaced by another error.

@patreeceeo
Copy link
Author

Also, I haven't had time to fully investigate, but I suspect the "add campaign" example I referenced is broken.

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

No branches or pull requests

2 participants