Google Ads API header_error: INVALID_LOGIN_CUSTOMER_ID

157 views
Skip to first unread message

Deb

unread,
Apr 21, 2024, 6:02:37 PM4/21/24
to Google Ads API and AdWords API Forum
Hello,

I'm stuck and hoping to get some help with this. I'm using Python 3 and using the "MutateGoogleAdsRequest" service to make changes to campaign budgets. I have a list of updated "CampaignBudgetOperation" operations with the use of helper field masks that I assigned to the "mutate_operations" attribute of the request. The response returns ""The login customer id header \\\'Optional[XXX-XXX-XXXX]\\\' could not be validated." I replaced the actual ID with X's. I have been using this login_customer_id to access reports etc.

Does anyone know what this error means?

Google Ads API Forum Advisor

unread,
Apr 22, 2024, 7:09:30 AM4/22/24
to adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I understand that you have encountered the error "INVALID_CUSTOMER_ID." It means that the provided 
customer ID is invalid. In order to replicate the issue from our end, provide us with the complete API logs (request and response with request-id and request header) generated at your end.

Since you are using the Python client library, if you haven't enabled the logging yet, I would request you to enable it by referring to this guide Python.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tPGgy:ref" (ADR-00231959)

Thanks,
 
Google Logo Google Ads API Team


Maria

unread,
Apr 22, 2024, 2:11:17 PM4/22/24
to ads...@forumsupport.google, adwor...@googlegroups.com
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/so4c1000000000000000000000000000000000000000000000SCCCAX00KNuA664rQ7qCw6lh04JWOg%40sfdc.net.

Google Ads API Forum Advisor

unread,
Apr 23, 2024, 6:16:47 AM4/23/24
to m980...@gmail.com, adwor...@googlegroups.com
Hi,

It appears that the login-customer-id field is added with hyphens (-). In line with this, could you confirm if you are setting login-customer-id in the request header in this format XXX-XXX-XXXX (e.g. 123-456-7890)? If yes, please try removing the hyphens (-) in the login-customer-id and try the API request again.

If you still get an issue after following the steps, could you provide us with the complete API logs (request and response with request-id and request header) generated on your end.

D. H.

unread,
Apr 23, 2024, 6:35:23 AM4/23/24
to Google Ads API and AdWords API Forum
"The login customer id header \\\'Optional[XXX-XXX-XXXX]\\\' could not be validated."

If you're passing in the customer ID value with hyphens like "111-222-3333" you need to pass without for the API: "1112223333".

D.H.
 

Google Ads API Forum Advisor

unread,
Apr 23, 2024, 10:44:47 AM4/23/24
to heiberge...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your input on the issue.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tPHgL:ref" (ADR-00232263)


Thanks,
 
Google Logo Google Ads API Team


Deb

unread,
Apr 24, 2024, 9:30:06 AM4/24/24
to Google Ads API and AdWords API Forum
Thank you all. The dashes in the ID was indeed the issue. I am able to push the mutations successfully now.
Reply all
Reply to author
Forward
0 new messages