Invalid customer ID ''.
See original GitHub issueI use version 5.2.0 of the package and would like to upload a click conversion, but unfortunately I always get the error message:
"errorMessage": {
"errors": [
{
"error_code": {
"request_error": "INVALID_CUSTOMER_ID"
},
"message": "Invalid customer ID ''."
}
],
"request_id": "8mdifVT1ymeTIdKLZ3mmuQ"
}
My code looks like this:
const { GoogleAdsApi, services } = require('google-ads-api');
async function upload() {
const client = new GoogleAdsApi({
client_id: 'aaaaaa.apps.googleusercontent.com',
client_secret: 'secret',
developer_token: 'another secret',
});
const customer = client.Customer({
customer_id: '1234567890', // no hyphens
refresh_token: 'refresh token',
});
const conversion = new services.ClickConversion({
gclid: 'some gclid',
conversion_action: '987654321',
conversion_date_time: '2021-06-08 07:58:35+00:00',
conversion_value: 123,
currency_code: 'EUR',
});
const result = await customer.conversionUploads.uploadClickConversions([conversion]);
}
I already read this issue here: https://github.com/Opteo/google-ads-api/issues/259 and this works for me:
let customerClients = await customer.report({
entity: 'customer_client',
attributes: [
'customer.resource_name',
'customer_client.manager',
'customer.descriptive_name',
'customer_client.client_customer',
],
})
So I’m pretty sure that the customer_id
I use is correct.
I also tried to set login_customer_id
, but that also doesn’t help.
What am I doing wrong ? Is the way I create the click conversion correct ?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
INVALID_CUSTOMER_ID Error for Google ads api
The error INVALID_CUSTOMER_ID occurs if customer ID is invalid. When making an API call, you must use a client account ID as the...
Read more >My customer ID is invalid!? - Google Ads Community
I'm trying to connect?link my account on my other youtube channel and usually a customer Id has hyphen but mine has no hyphens...
Read more >Invalid Customer ID - google-ads-api, I have provided correct ...
I am using google-ads-api module in nodejs to connect with Google Ads API. I am using this code block to get Customer const...
Read more >ReaderSDK - ERROR: Invalid customer ID - Square Developer
I've authenticated a user via OAuth, and using their access token I've created a customer linked to their account. ERROR: Invalid customer ID. ......
Read more >Unable to deactivate online services: Invalid customer ID
When I try to deactivate it, I am getting that message "Invalid Customer ID: Customer ID can only contain alpha numeric values.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LuKaa Well found! The
get
function is still available, however you will need to use the customer resource name instead of the id. The customer resource name looks like this:customers/123456789
, where the numerical value is the customer id.I found the error in my request.
I was using customer_account_id instead of customer_id.
Requests are working now but customer.get(id) is still not working. I will find a workaround for this I guess the function got deprecated in v5 or v8