"Maximum number of user identifiers allowed per request is 100000 and per operation is 20" error

520 views
Skip to first unread message

Chethan U

unread,
Jan 4, 2023, 12:57:04 AM1/4/23
to Google Ads API and AdWords API Forum
 Hi I'm trying to upload customer segment which consists of mobile number and email to Google ads accounts via Google ads api.
The CSV file consists of 75000 rows and I'm getting this error.
Please suggest what is the problem and what can be done. 

Google Ads API Forum Advisor

unread,
Jan 4, 2023, 3:16:04 AM1/4/23
to chetha...@gmail.com, adwor...@googlegroups.com
Hi Chethan,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

Moving forward to your concern, I can see here that the error that you got is "TOO_MANY_USER_IDENTIFIERS." Please note that there's an update that the maximum number of user_identifers set in a UserData to 20. If the number of user_identifiers for a single set exceeds the new limit of 20, a TOO_MANY_USER_IDENTIFIERS error will be generated. You may check this blog post for detailed information regarding this.

If the issue persists, please provide us the complete request and response logs with request ID and request header generated on your end? If you haven't enabled the logging yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

Please provide the logs via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hZOVp:ref

Chethan U

unread,
Jan 5, 2023, 12:00:08 AM1/5/23
to Google Ads API and AdWords API Forum
Hi I need one more clarification.
I have a csv file which has 70000 rows in which it contains 2 columns named as 'Mobilenumber' and 'email'. I was trying to upload this file to google ads account through google ads api.
In this case both mobilenumber and email together considered as 140000 identifiers?
Is this the reason behind the error I'm getting  "Maximum number of user identifiers allowed per request is 100000 and per operation is 20"?
Please reply me as ASAP
Thanks

Google Ads API Forum Advisor

unread,
Jan 5, 2023, 2:54:03 AM1/5/23
to chetha...@gmail.com, adwor...@googlegroups.com
Hi Chethan,

Thank you for the reply.

Please see the responses below for each question.


In this case both mobilenumber and email together considered as 140000 identifiers?
  • If these are indeed uploaded with different user_identifiers then I could confirm that this is considered as 140000 identifiers.
Is this the reason behind the error I'm getting "Maximum number of user identifiers allowed per request is 100000 and per operation is 20"?
  • Yes, as stated in this blog post, if the number of user_identifiers in a single set exceeds the new limit of 20, a TOO_MANY_USER_IDENTIFIERS error will be generated. This is to clarify that each set should represent a single user.
On the other hand, I recommend you also check this documentation for more information in UserIdentifier and the below sample request for reference:
operations: {
  create: {
    user_identifiers {
      hashed_email: hash(“joh...@gmail.com”)
    },
    user_identifiers {
       hashed_phone_number: hash(“1111”)
    } 
  }
}
operations: {
  create: {
    user_identifiers {
      hashed_email: hash(“maxmus...@gmail.com”)
    },
    user_identifiers {
      hashed_phone_number: hash(“2222")
    }
  }
}

Best regards,
Google Logo
Heidi
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2hZOVp:ref
Message has been deleted

Google Ads API Forum Advisor

unread,
Jan 5, 2023, 8:44:22 AM1/5/23
to chetha...@gmail.com, adwor...@googlegroups.com
Hi Chethan,

Thank you for bringing this to our attention.

With regard to your questions, please refer to my answers below:

1.From this  code can you confirm me whether I'm uploading as different user identifiers or what?
Upon checking your code below, I can confirm that you are uploading a different user identifiers.

if data_type == 'emails':
user_identifier.hashed_email = item['hashed_email']
elif data_type == 'phones':
user_identifier.hashed_phone_number = item['hashed_phone_number']
elif data_type == 'mobile_ids':
user_identifier.mobile_id = item['mobile_id']
elif data_type == 'user_ids':
user_identifier.third_party_user_id = item['third_party_user_id']
elif data_type == 'addresses':
user_identifier.address_info.hashed_first_name = item[
'hashed_first_name']
user_identifier.address_info.hashed_last_name = item['hashed_last_name']
user_identifier.address_info.country_code = item['country_code']
user_identifier.address_info.postal_code = item['postal_code']


2.If I'm uploading as different user identifier then is it possible to upload user identifiers having > 1 lakh count?
If you are using OfflineUserDataJobService.AddOfflineUserDataJobOperations method and this is up to 1,000,000 identifiers to a single job.

3.If possible how can I upload more than 1 lakh user identifiers?
 If you need to upload more than 100,000 identifiers for a job, you may need to send multiple requests with the same job resource_name. For more information, you may check this document

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hZOVp:ref
Message has been deleted

Google Ads API Forum Advisor

unread,
Jan 9, 2023, 2:56:23 AM1/9/23
to chetha...@gmail.com, adwor...@googlegroups.com
Hi,


Thank you for the reply.

Kindly note that our team doesn't provide any code implementation, but you may need to implement it on your own. However, you can use the OfflineUserDataJobService to create a new UserData with the same resource_name as the previous OfflineUserDataJob (offline_user_data_job_resource_name) you used.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hZOVp:ref

Google Ads API Forum Advisor

unread,
Jan 9, 2023, 3:01:23 AM1/9/23
to adwor...@googlegroups.com, chetha...@gmail.com
Hi,

Thank you for the reply.

Kindly note that our team doesn't provide any custom code implemenations, but you may need to implement it on your own. However, you can use the OfflineUserDataJobService to create a new UserData with the same resource_name as the previous OfflineUserDataJob (offline_user_data_job_resource_name) you used.
Message has been deleted

Google Ads API Forum Advisor

unread,
Jan 13, 2023, 1:00:05 PM1/13/23
to chetha...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for your reply.

I can see how difficult this has been. If you want us to check this, you may provide us the complete API logs, as our team cannot troubleshoot your codes. In addition; to address this error, you may please follow the Customer Match considerations below:
 
  • The operations collection for each AddOfflineUserDataJobOperationsRequest can contain at most 100,000 identifiers across all of the UserData objects in the operations. If you need to submit more than 100,000 identifiers for a job, send multiple requests with the same job resource_name.
  • When uploading store sales transactions, the following limits apply to the number of operations added to a job:
  • There are no limits on the number of operations you can add to a single job. However, for optimal processing, we recommend adding up to 10,000 identifiers in a single call to the OfflineUserDataJobService.AddOfflineUserDataJobOperations method and up to 1,000,000 identifiers to a single job.
Also, please take notes in this blog post.

Best regards,
Google Logo
Jinky
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2hZOVp:ref
Reply all
Reply to author
Forward
0 new messages