Hi Peter, Thanks for your corrections. This issue is resolved, but I have other questions that I would like to consult you, do I put them in this thread or do I open another conversation?. The doubts are about how to obtain various statistical data.
Regards, Gloria Muñoz. El miércoles, 25 de noviembre de 2020 a las 3:04:36 UTC+1, adsapiforumadvisor escribió: > Hi Gloria, > > Thank you for these details. However, I had to remove one of your *earlier > responses* once again due to it containing your account information. If > you would be unable to reply to us privately, you may send any requested > details containing sensitive information to our *googleadsa...@google.com* > alias instead. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *Dear Peter, Thanks for your quick response. I reply to all because "Reply > privately to author" option disabled. I'll tell you about the problem in > more detail. I created an MCC production account (with test developer > token), from that account I created a test account, from the test account I > created 3 customer accounts, in each customer account I created several > campaigns of different types. I also got the OAuth2 credentials (Client ID, > Client Secret) for the MCC production account and the refresh token. With > all these parameters I configured the ads.properties of the Google Adwords > API and I ran several utilities that worked well for me. I also passed the > parameters with programming and it kept working fine. Then I downloaded the > Google Ads API libraries and examples and set up the ads.properties in a > similar way, as indicated in the guide. But I don't get results. My test > customers are: Cliente 1: XXXXXXXXX Cliente de prueba 1: XXXXXXXXX > XXXXXXXXX: XXXXXXXXX The code that I use to connect with Google Ads is that > of GetCampaigns as follows: UserCredentials credentials = > UserCredentials.newBuilder() .setClientId(mccClientId) > .setClientSecret(mccClientSecret) > .setRefreshToken(mccRefreshToken) .build(); GoogleAdsClient > gaClient = GoogleAdsClient.newBuilder() > .setDeveloperToken(mccDeveloperToken) > .setCredentials(credentials) > .setLoginCustomerId(Long.valueOf(clientCustomerId.replace("-", ""))) > .build(); try (GoogleAdsServiceClient googleAdsServiceClient = > gaClient.getLatestVersion() .createGoogleAdsServiceClient()) { > String query = "SELECT campaign.id > <http://campaign.id/>, campaign.name <http://campaign.name/> FROM campaign > ORDER BY campaign.id <http://campaign.id/>"; > SearchGoogleAdsStreamRequest request = > SearchGoogleAdsStreamRequest.newBuilder() > .setCustomerId(clientCustomerId.replace("-", "")) > .setQuery(query) .build(); > ServerStream<SearchGoogleAdsStreamResponse> stream = googleAdsServiceClient > .searchStreamCallable() .call(request); > for (SearchGoogleAdsStreamResponse response : stream) { for > (GoogleAdsRow googleAdsRow : response.getResultsList()) { > System.out.printf("Campaign with ID %d and name '%s' was found.%n", > googleAdsRow.getCampaign().getId(), > googleAdsRow.getCampaign().getName()); } } } > } In the clientCustomerId variable I pass the previous Customer IDs > without hyphens and it returns the USER_PERMISSION_DENIED error for all > cases. I have run the code from ListAccessibleCustomers and it gives me > other different IDs: "Total results: 3 Customer resource name: customers / > XXXXXXXXX Customer resource name: customers / XXXXXXXXX Customer resource > name: customers / XXXXXXXXX I have also tried to pass these IDs and the > result is the same, except for the last one that returns an empty list of > campaigns. We have already requested the Basic Token, but at the moment we > do not have it. What surprises me is that with Google Adwords API test > accounts work well and with Ads API nothing works. Any idea what I'm doing > wrong? * > > Moving forward, and based on your *most recent response*, could you > confirm if your issues have now been resolved and if there is anything our > team can further assist with? > > > Best regards, > > [image: Google Logo] > Peter Laurence Napa Oliquino > Google Ads API Team > > > ref:_00D1U1174p._5004Q27vuY7: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 "AdWords API and Google Ads 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/e426de28-c311-4dfe-8250-b28e0014ce43n%40googlegroups.com.