Solved. The problem was I was create credentials using the customer id. In order to fix it, I create the credential using the root account id and during queries, I have to choose the login-customer-id. By playing with https://developers.google.com/google-ads/api/docs/migration/login-customer-id was useful. Example:
static GoogleAdsClient getClient() { return GoogleAdsClient.newBuilder().setCredentials(getCredential())// .setLoginCustomerId(rootCustomerId)// .setDeveloperToken(developerToken).build(); } private static Credentials getCredential() { return UserCredentials.newBuilder().setClientId(clientId).setRefreshToken(refreshToken) .setClientSecret(clientSecret).build(); } And when doing the queries, choose the proper loginCustomerId SearchGoogleAdsStreamRequest request = SearchGoogleAdsStreamRequest.newBuilder().setCustomerId( Long.toString(loginCustomerId)).setQuery(query).build(); On Sunday, February 20, 2022 at 11:44:23 AM UTC-3 gardella...@gmail.com wrote: > Hi, > > I am having the same issue. How did you solve it? > > Thanks, > Juan > > On Friday, November 22, 2019 at 1:59:54 PM UTC-3 Google Ads API Forum > Advisor Prod wrote: > >> Hi Paul, >> >> When we make an API request it is very important that we make sure there >> is a link between the manager account authenticated in the request and the >> client account specified in the headers. Also you have to make sure the >> *OAuth2 >> credentials* that are being used belong to the manager account you are >> authenticating. Could you please provide your main MCC customer Id and >> specify the ones that are working and the ones that you encounter issues >> with? Please reply to us with the above information via the *Reply >> privately to author* option. >> >> >> >> Thanks and regards, >> Xiaoming, Google Ads API Team >> >> >> >> ref:_00D1U1174p._5001UOCwYj:ref >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/25bed54e-cd1c-4690-a670-8c7aaee16da3n%40googlegroups.com.