Re: CONCURRENT_MODIFICATION error creating ResponsiveTextAd

2018-09-10 Thread 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Jon,

Thank you for the confirmation.

Hi Scott,

Could you confirm if you still encountered the error? If so, could you 
provide the complete SOAP request and response logs so I could further 
investigate the issue? Please reply via *Reply privately to author*.

Regards,
Luis
AdWords API Team

On Tuesday, September 11, 2018 at 12:47:38 AM UTC+8, jon wrote:
>
> The bug appears to be fixed now. Is it fixed for you Scott?
>
> On Saturday, September 8, 2018 at 4:38:02 PM UTC-7, j...@stackstorage.co 
> wrote:
>>
>> I am getting repeated CONCURRENT_MODIFICATION errors trying to create a 
>> Responsive Text Ad. I checked for the usual causes of this exception 
>> according to the documentation and other discussions in this forum, and 
>> none of them apply. I can reproduce it trying to create a single ad through 
>> the API with nothing else modifying AdWords. Is this a known bug on the 
>> server? Thanks.
>>
>> -Jon
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1f6baf25-312a-4676-844e-1f003843118f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get a link to a page from an ad? use googleads-php-lib v201806

2018-09-10 Thread Евгений Морозов


вторник, 11 сентября 2018 г., 2:59:43 UTC+3 пользователь Евгений Морозов 
написал:
>
> I found an example 
> get-expanded-text-ads-in-an-ad-group.php 
> 
>
> how to modify it to return a link to site page?
>
> example
>
>
> class GetExpandedTextAds
> {
>
> const AD_GROUP_ID = 'INSERT_AD_GROUP_ID_HERE';
> const PAGE_LIMIT = 500;
>
> public static function runExample(
> AdWordsServices $adWordsServices,
> AdWordsSession $session,
> $adGroupId
> ) {
> $adGroupAdService = $adWordsServices->get($session, 
> AdGroupAdService::class);
>
> // Create a selector to select all ads for the specified ad group.
> $selector = new Selector();
> $selector->setFields(
> ['Id', 'Status', 'HeadlinePart1', 'HeadlinePart2', 'Description']
> );
> $selector->setOrdering([new OrderBy('Id', SortOrder::ASCENDING)]);
> $selector->setPredicates(
> [
> new Predicate('AdGroupId', PredicateOperator::IN, 
> [$adGroupId]),
> new Predicate(
> 'AdType',
> PredicateOperator::IN,
> [AdType::EXPANDED_TEXT_AD]
> ),
> new Predicate(
> 'Status',
> PredicateOperator::IN,
> [AdGroupAdStatus::ENABLED, AdGroupAdStatus::PAUSED]
> )
> ]
> );
> $selector->setPaging(new Paging(0, self::PAGE_LIMIT));
>
> $totalNumEntries = 0;
> do {
> // Retrieve ad group ads one page at a time, continuing to 
> request pages
> // until all ad group ads have been retrieved.
> $page = $adGroupAdService->get($selector);
>
> // Print out some information for each ad group ad.
> if ($page->getEntries() !== null) {
> $totalNumEntries = $page->getTotalNumEntries();
> foreach ($page->getEntries() as $adGroupAd) {
> printf(
> "Expanded text ad with ID %d, status '%s', and 
> headline '%s - %s' was found.\n",
> $adGroupAd->getAd()->getId(),
> $adGroupAd->getStatus(),
> $adGroupAd->getAd()->getHeadlinePart1(),
> $adGroupAd->getAd()->getHeadlinePart2()
> );
> }
> }
>
> $selector->getPaging()->setStartIndex(
> $selector->getPaging()->getStartIndex() + self::PAGE_LIMIT
> );
> } while ($selector->getPaging()->getStartIndex() < $totalNumEntries);
>
> printf("Number of results found: %d\n", $totalNumEntries);
> }
>
>
> public static function main()
> {
> // Generate a refreshable OAuth2 credential for authentication.
> $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
>
> // Construct an API session configured from a properties file and the
> // OAuth2 credentials above.
> $session = (new 
> AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->build();
> self::runExample(
> new AdWordsServices(),
> $session,
> intval(self::AD_GROUP_ID)
> );
> }
> }
>
> GetExpandedTextAds::main();
>
>
> im add selectors
>

$selector->setFields(
['Id', 'Status', 'HeadlinePart1', 'HeadlinePart2', 
'Description', 'path1', 'path2', 'url', 'displayUrl', 'finalUrls', 
'finalMobileUrls', 'finalAppUrls', 'urlData']
); 

result: error

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/82fd0601-3457-4f0a-864b-2761cc0ccd22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to get a link to a page from an ad? use googleads-php-lib v201806

2018-09-10 Thread Евгений Морозов
I found an example 
get-expanded-text-ads-in-an-ad-group.php 


how to modify it to return a link to site page?

example

$totalNumEntries = 0;
do {
// Retrieve ad group ads one page at a time, continuing to request 
pages
// until all ad group ads have been retrieved.
$page = $adGroupAdService->get($selector);

// Print out some information for each ad group ad.
if ($page->getEntries() !== null) {
$totalNumEntries = $page->getTotalNumEntries();
foreach ($page->getEntries() as $adGroupAd) {
printf(
"Expanded text ad with ID %d, status '%s', and headline 
'%s - %s' was found.\n",
$adGroupAd->getAd()->getId(),
$adGroupAd->getStatus(),
$adGroupAd->getAd()->getHeadlinePart1(),
$adGroupAd->getAd()->getHeadlinePart2(),

$adGroupAd->getLink() // Link to site? https://site.com

   );
}
}

$selector->getPaging()->setStartIndex(
$selector->getPaging()->getStartIndex() + self::PAGE_LIMIT
);
} while ($selector->getPaging()->getStartIndex() < $totalNumEntries
);

printf("Number of results found: %d\n", $totalNumEntries);



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8ba4f1bb-0c98-49c5-b163-3fc76ce1e4c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Retrieve user Google Ads accounts using OAuth2 access_token

2018-09-10 Thread itorres


Hi folks,

I have been struggling with OAuth2 and Google Adwords API for a while but 
the posts in this group did not solved my problem, so excuse me if I repeat 
any question already made.

I would like to *retrieve all accounts from a given Google Ads user*, after 
the sign-in and consent screens, *using the tokens retrieved* to link those 
accounts to my own MCC account. 

The OAuth2 flow I have been following is as described in many places, i.e: 
https://256stuff.com/gray/docs/oauth2.0/2

I am using the PHP client and I would like to retrieve the info on behalf 
of other Google Ads users: 
https://github.com/googleads/googleads-php-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow)


I have created the project with OAuth2 credentials as a web app, enabled 
the Adwords API and the tokens (access and refresh) are being retrieved 
like a charm.
I have already checked that the scope for the user token stored in my 
database is the right one with 
https://www.googleapis.com/oauth2/v3/tokeninfo
I am using a Google Test account MCC but the Sing-In/Consent process is 
done with a regular not testing Google Ads account.

Access_Token_Info
{
 "azp": "vvv.apps.googleusercontent.com",
 "aud": "vvv.apps.googleusercontent.com",
 "sub": "112558273664355511061",
 "scope": "https://www.googleapis.com/auth/plus.me 
https://www.googleapis.com/auth/userinfo.profile 
https://www.googleapis.com/auth/userinfo.email 
https://www.googleapis.com/auth/adwords;,
 "exp": "1536585726",
 "expires_in": "1565",
 "email": "user_em...@gmail.com",
 "email_verified": "true",
 "access_type": "offline"
}

My code
$oAuth2 = new OAuth2(
[
'authorizationUri' => 
'https://accounts.google.com/o/oauth2/v2/auth',
'tokenCredentialUri' => 
'https://www.googleapis.com/oauth2/v4/token',
'redirectUri' => env('APP_URL') . env('GOOGLE_REDIRECT_URI'
),
'clientId' => env('GOOGLE_ID'),
'clientSecret' => env('GOOGLE_SECRET'),
'scope' => 'https://www.googleapis.com/auth/adwords',
'refresh_token' => 
''
]
);

$oAuth2->setState(sha1(openssl_random_pseudo_bytes(1024)));
$oAuth2->setAccessToken('');

$session = (new AdWordsSessionBuilder())
// ->withClientCustomerId('')
->withDeveloperToken('')
->withOAuth2Credential($oAuth2)
->build();

$adWordsServices = new AdWordsServices();
$service = $adWordsServices->get($session, CustomerService::class);

// Make the get request.
$page = $service->getCustomers();

In my request I am omitting the clientCustomerId intentionally and setting 
the user's access and refresh tokens, but not so sure this is the right way.

Response
[2018-09-10 12:49:21] AW_SOAP.WARNING: clientCustomerId= operations=1 
service=CustomerService method=getCustomers responseTime=240 requestId=
00057583c9396a300a858c56a20d3063 server=adwords.google.com isFault=1 
faultMessage=[AuthenticationError.CUSTOMER_NOT_FOUND @ ]
[2018-09-10 12:49:21] AW_SOAP.NOTICE: POST /api/adwords/mcm/v201806/
CustomerService?wsdl HTTP/1.1
Host: adwords.google.com
Connection: close
User-Agent: PHP-SOAP/7.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 625
Authorization: REDACTED


http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=
"https://adwords.google.com/api/adwords/mcm/v201806; xmlns:ns2=
"https://adwords.google.com/api/adwords/cm/v201806;>REDACTEDunknown
 
(AwApi-PHP, googleads-php-lib/37.0.0, PHP/7.2.8)falsefalse

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Date: Mon, 10 Sep 2018 12:49:20 GMT
Expires: Mon, 10 Sep 2018 12:49:20 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39,35"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close

http://schemas.xmlsoap.org/soap/envelope/;>https://adwords.google.com/api/adwords/cm/v201806; xmlns=
"https://adwords.google.com/api/adwords/mcm/v201806;>
00057583c9396a300a858c56a20d3063<
/ns2:requestId>CustomerServicegetCustomers1<
ns2:responseTime>240soap:Server[AuthenticationError.CUSTOMER_NOT_FOUND
 
@ ]https://adwords.google.com/api/adwords/mcm/v201806; xmlns:ns2=
"https://adwords.google.com/api/adwords/cm/v201806;>[
AuthenticationError.CUSTOMER_NOT_FOUND @ ]ApiExceptionhttp://www.w3.org/2001/XMLSchema-instance; xsi:type="ns2:
AuthenticationError
">AuthenticationError.CUSTOMER_NOT_FOUNDAuthenticationErrorCUSTOMER_NOT_FOUND

I always get the CUSTOMER_NOT_FOUND error and if I include instead the MCC 
clientCustomerId the error changes to 
AuthorizationError.USER_PERMISSION_DENIED.

Is this the right approach to get all Adwords accounts for a given user 
using OAuth2?
Hope anyone can help me figure it out and thanks to everyone. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Re: No customer found python error - TrafficEstimatorService Sample

2018-09-10 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Raihan,

The NO_CUSTOMER_FOUND 

 error 
occurs when you are passing the wrong client customer Id on the request 
header. Could you please verify whether you are passing the right client 
customer Id in the googleads.yaml 

 file? 
If you are still facing issues please share the SOAP logs(request and 
response) of the operation performing without redacting any information. 
You could use reply privately to the author option while sharing the 
details.

Regards,
Sai Teja, AdWords API Team.

On Monday, September 10, 2018 at 5:51:18 AM UTC-4, Raihan Masroor wrote:
>
> Hi,
>
> After getting client id, secret token, developer token, and refresh token, 
> I'm unable to get execute my code found in 
> https://developers.google.com/adwords/api/docs/samples/python/optimization#estimate-keyword-traffic
> .
>
> After running my code, i get the error: 
>
> main(adwords_client)
>   File "estimate-keyword-traffic.py", line 97, in main
> estimates = traffic_estimator_service.get(selector)
>   File "/home/ubuntu/var/www/adwords_python/googleads/common.py", line 
> 1391, in MakeSoapRequest
> e.detail, errors=error_list, message=e.message)
> googleads.errors.GoogleAdsServerFault: 
> [AuthorizationError.NO_CUSTOMER_FOUND @ ]
>
> Anybody know what could be wrong? My developer token is for a test 
> account. Could this be an issue?
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/650b3128-d2cc-490f-bbed-78fa49312926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot link test accounts + Test clients not showing in accounts management

2018-09-10 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Ivan,

Glad the problem is resolved and thanks for sharing the brief details. 
Please find my response below.

   1. Ideally, there shouldn't be any delay to linkup a test client account 
   when created through the manager account. You might need to refresh the 
   page, if they are not reflected instantly. If the problem persists even 
   after refreshing the page, you could report it to the AdWords product team 
   through via the help icon in your Google Ads UI. 
   
   2. Since, The "Set up OAuth2 authentication" section in this guide 
   

 is 
   generalized for test and production accounts, it does not mention as test 
   manager account specifically. But, we need to determine it based on the 
   accounts(Test/Production) for which we need to generate OAuth2 credentials. 
   
Let me know if you have any further questions.

Regards,
Sai Teja, AdWords API Team.

On Friday, September 7, 2018 at 4:17:41 PM UTC-4, Ivan wrote:
>
> Teja, thanks for your help. It's solved now. In case it's useful for 
> someone else, there were two different issues:
>
> 1. Yesterday I was in fact logged in to my test manager account when I 
> created the test client accounts (red label displayed, as in attachment), 
> so I am certain I was creating them correctly and still they did not show 
> up in the "Accounts" menu, only in "Overview", and even in "Overview" I 
> could not link them to the test manager account, instead I kept getting the 
> message "You can't link this account because it's already linked to another 
> manager in this account hierarchy." However, I simply tried again today 
> (same test manager, same previously created test client accounts, same 
> menu) and this time they were linked successfully... It's either a bug or 
> there's a set waiting time for linking test accounts.
>
> 2. It turns out I that my OAuth credentials were for my production manager 
> account, as I got them while logged in with it, but in fact I needed OAuth 
> credentials for my *test* manager account, so I got a client ID / secret 
> for the latter and it worked! The documentation says "While logged in with 
> your manager account credentials, open the Google API Console Credentials 
> page." In the interest of clarity, this should read "with your *test *manager 
> account credentials."
>
> Thanks again!
>
> On Friday, September 7, 2018 at 4:26:57 PM UTC-3, Teja Makani wrote:
>>
>> Hello Ivan,
>>
>> You are right, the AuthorizationError.USER_PERMISSION_DENIED 
>> 
>>  occurs 
>> when there is no link between the manager account authenticated in the 
>> request and the client account specified in the headers. 
>>
>> While logged into AdWords as your test manager account, any client 
>> accounts you create will automatically be test accounts under that manager 
>> only. If you don't see the test accounts under your test MCC account, It 
>> could be possible that while creating test accounts you might login as 
>> another MCC account user. So, as a precaution you could use incognito 
>> window of browser and login with your test MCC account to create test 
>> client accounts 
>> .
>>  
>> If you don't want to create new accounts then you can un link the 
>> accounts  under 
>> that another manager account and link them  
>> to your manager 
>> account. Alternatively you can link and un link accounts via API using 
>> managedCustomerService.mutateLink 
>> 
>>  service, 
>> you could refer this guide 
>> 
>>  for 
>> more details. Also, you could fetch the list of accounts linked to your 
>> manager account by using managedCustomerService.get  
>> 
>> operation.
>>
>> If you are still facing issues, please share the MCC Id's of test manager 
>> accounts and CID's of test client accounts, you could use *reply 
>> privately to author* option while sharing the details.
>>
>> Regards,
>> Sai Teja, AdWords API Team.
>>
>> On Friday, September 7, 2018 at 5:17:02 AM UTC-4, Ivan wrote:
>>>
>>> Hello! 
>>>
>>> I am trying to make my first API call, so I set up a test manager 
>>> account and a few test client accounts (i.e. the dummy accounts created 
>>> under the test manager account). But when running 
>>> generate_refresh_token.py, I received this:
>>>
>>> Error summary: {'faultMessage': 
>>> "[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'']", 

Re: ManagedCustomerService get: different results links vs entries

2018-09-10 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Carmine,

Could you reply privately to author with your SOAP request and response as 
well as your client customer id, so that I can troubleshoot further? 
Regarding *using key present in links list* that you mentioned, could you 
give a specific example?

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0c8b51b6-ea04-45d5-947a-c2dac98182e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CONCURRENT_MODIFICATION error creating ResponsiveTextAd

2018-09-10 Thread jon
The bug appears to be fixed now. Is it fixed for you Scott?

On Saturday, September 8, 2018 at 4:38:02 PM UTC-7, j...@stackstorage.co 
wrote:
>
> I am getting repeated CONCURRENT_MODIFICATION errors trying to create a 
> Responsive Text Ad. I checked for the usual causes of this exception 
> according to the documentation and other discussions in this forum, and 
> none of them apply. I can reproduce it trying to create a single ad through 
> the API with nothing else modifying AdWords. Is this a known bug on the 
> server? Thanks.
>
> -Jon
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b89141a7-2106-4bd3-8c89-7cbb57f1f4e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ManagedCustomerService seems to be returning incorrect TestAccount for a couple of ManagedCustomers

2018-09-10 Thread Etleap Dev
Yes, my apologies, how we actually determine whether an account is "active" 
is if it has any enabled campaigns. Relevant code below:

private boolean hasActiveCampaign(ManagedCustomer customer) throws IOException {
   if (customer.getTestAccount()) {
  return true;
   }

   CampaignServiceInterface campaignService = 
service(CampaignServiceInterface.class,
  getSession(customer.getCustomerId().toString()));
   Selector selector = new SelectorBuilder()
  .fields(CampaignField.Status)
  .equals(CampaignField.Status, CampaignStatus.ENABLED.getValue())
  .limit(1)
  .build();
   Campaign[] campaigns = campaignService.get(selector).getEntries();
   return campaigns != null && campaigns.length > 0;
}

I will provide the requested customer information to you in a private message 
shortly.
-Jordan

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9046a59a-b48d-4ca3-acdc-440cd989da0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to retrieve Adwords accounts under an MCC account using CustomerService?

2018-09-10 Thread Stijn van Lieshout
Gotcha. I got the definition to work now by using the ManagedCustomerService 
.
 
Thanks!

On Monday, 10 September 2018 09:56:44 UTC+2, Peter Oliquino (AdWords API 
Team) wrote:
>
> Hi Stijn,
>
> The CustomerService is a service used only to retrieve account specific 
> information. If what you wish is to retrieve information on accounts under 
> a specific hierarchy, you will need to use the ManagedCustomerService 
> 
>  instead. 
> You may note that the CanManageClients 
> 
>  field 
> is also supported in the ManagedCustomer 
> 
>  object 
> of the ManagedCustomerService.
>
> I hope this helps and feel free to write back if you need further 
> information.
>
> Thanks and regards,
> Peter
> AdWords API Team
>
> On Monday, September 10, 2018 at 1:26:19 PM UTC+8, Stijn van Lieshout 
> wrote:
>>
>> I am building an Adwords application with oAuth 2.0 authentication in 
>> python. 
>>
>> I'm able to retrieve all Adwords accounts associated with a google 
>> account using the *get_accounts* function below. But now I would like to 
>> drill down deeper into the account hierarchy if an account 
>> canManageClients (read: mcc account). 
>>
>> I've already had a look at the Get account hierarchy under the current 
>> account 
>> 
>>  
>> but there ManagedCustomerService is used whereas I don't manage these 
>> accounts and am using CustomerService instead. 
>>
>> How to retrieve Adwords accounts under an MCC account using 
>> CustomerService?
>>
>> *How I am currently retrieving accounts:*
>>
>> from googleads import adwords
>>
>> def get_accounts(client):
>> customer_service = client.GetService('CustomerService', version=
>> 'v201806')  
>> selector = {
>> 'fields': ['customerId', 'descriptiveName', 'canManageClients']
>> }
>> accounts = customer_service.getCustomers(selector)
>>
>> result = []
>> for account in accounts:
>> customerId = account['customerId']
>> name = account['descriptiveName']
>> canManageClients = account['canManageClients']
>> if canManageClients:
>> # How to retrieve all accounts under MCC account here?
>> result.append({"id": customerId, "name": name, "canManageClients"
>> : canManageClients})
>> return result
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/baa1c4e6-8916-4c94-8211-f7720a07443c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ad in ad performance report segmented by date has empty date field

2018-09-10 Thread Tomas R
Yes, it does. Thank you for the clarification.


On Monday, September 10, 2018 at 11:57:52 AM UTC+2, Luis Xander Talag 
(AdWords API Team) wrote:
>
> Hi Tomas,
>
> My apologies for the confusion. Upon further checking, the escape 
> character that is being used in each value on the reports is double quotes 
> (""). For example your campaign name is (Campaign "36") it would result as 
> ("Campaign ""36""") when generated via API.
>
> Hope this clarifies your concern.
>
> Regards,
> Luis
> AdWords API Team
>
>
> On Monday, September 10, 2018 at 2:21:36 PM UTC+8, Tomas R wrote:
>>
>> What? I am well aware that CSV stands for "comma separated values". I am 
>> asking what is the escape character used when generating the CSV. There is 
>> nothing about escape characters in the documentation and no, comma is not 
>> the escape character. It's either double quotes or backslash.
>>
>> On Monday, September 10, 2018 at 5:27:27 AM UTC+2, Luis Xander Talag 
>> (AdWords API Team) wrote:
>>>
>>> Hi Tomas,
>>>
>>> The Adwords API uses comma separated escape character for csv output 
>>> format. You may refer to this guide 
>>> 
>>>  for 
>>> other supported download formats.
>>>
>>> Regards,
>>> Luis
>>> AdWords API Team
>>>
>>> On Friday, September 7, 2018 at 8:24:59 PM UTC+8, Tomas R wrote:

 What's the escape character used by AdWords reporting API when 
 exporting CSV file? Is it backslash or double quote character?

 On Friday, September 7, 2018 at 10:32:17 AM UTC+2, Tomas R wrote:
>
> Hi Luis,
>
> We found the problem. The  reporting API is returning improperly 
> formatted CSV document, because it doesn't escape backslashes, which 
> causes 
> two columns to be merged into one when there is a backslash at the end of 
> the cell value.
>
>
> On Thursday, September 6, 2018 at 9:59:25 AM UTC+2, Luis Xander Talag 
> (AdWords API Team) wrote:
>>
>> Hi Tomas,
>>
>> To further investigate the problem, can you provide the 
>> clientCustomerId and the complete report definition 
>> 
>>  you 
>> used to generate the report? Please reply via *Reply privately to 
>> author*.
>>
>>
>> Best Regards,
>> Luis
>> AdWords API Team
>>
>> On Thursday, September 6, 2018 at 2:50:44 PM UTC+8, Tomas R wrote:
>>>
>>> Hi,
>>>
>>> Today we noticed an unusual response from AdWords reporting API. One 
>>> of the "expanded text ads" in ad performance report segmented by date 
>>> had 
>>> an empty value for the date field. Can you explain why that would 
>>> happen?
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/80266b64-b3e6-4b24-aed5-5530ab0139ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ad in ad performance report segmented by date has empty date field

2018-09-10 Thread 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Tomas,

My apologies for the confusion. Upon further checking, the escape character 
that is being used in each value on the reports is double quotes (""). For 
example your campaign name is (Campaign "36") it would result as ("Campaign 
""36""") when generated via API.

Hope this clarifies your concern.

Regards,
Luis
AdWords API Team


On Monday, September 10, 2018 at 2:21:36 PM UTC+8, Tomas R wrote:
>
> What? I am well aware that CSV stands for "comma separated values". I am 
> asking what is the escape character used when generating the CSV. There is 
> nothing about escape characters in the documentation and no, comma is not 
> the escape character. It's either double quotes or backslash.
>
> On Monday, September 10, 2018 at 5:27:27 AM UTC+2, Luis Xander Talag 
> (AdWords API Team) wrote:
>>
>> Hi Tomas,
>>
>> The Adwords API uses comma separated escape character for csv output 
>> format. You may refer to this guide 
>> 
>>  for 
>> other supported download formats.
>>
>> Regards,
>> Luis
>> AdWords API Team
>>
>> On Friday, September 7, 2018 at 8:24:59 PM UTC+8, Tomas R wrote:
>>>
>>> What's the escape character used by AdWords reporting API when exporting 
>>> CSV file? Is it backslash or double quote character?
>>>
>>> On Friday, September 7, 2018 at 10:32:17 AM UTC+2, Tomas R wrote:

 Hi Luis,

 We found the problem. The  reporting API is returning improperly 
 formatted CSV document, because it doesn't escape backslashes, which 
 causes 
 two columns to be merged into one when there is a backslash at the end of 
 the cell value.


 On Thursday, September 6, 2018 at 9:59:25 AM UTC+2, Luis Xander Talag 
 (AdWords API Team) wrote:
>
> Hi Tomas,
>
> To further investigate the problem, can you provide the 
> clientCustomerId and the complete report definition 
> 
>  you 
> used to generate the report? Please reply via *Reply privately to 
> author*.
>
>
> Best Regards,
> Luis
> AdWords API Team
>
> On Thursday, September 6, 2018 at 2:50:44 PM UTC+8, Tomas R wrote:
>>
>> Hi,
>>
>> Today we noticed an unusual response from AdWords reporting API. One 
>> of the "expanded text ads" in ad performance report segmented by date 
>> had 
>> an empty value for the date field. Can you explain why that would happen?
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/05f3d0bd-8739-4bd6-a25a-6e92b9e5e91a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionService: can still get removed product partitions.

2018-09-10 Thread 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi,

It is an expected behavior that once you remove the criterion, you would 
still be able to retrieve this when using the AdGroupCriterionService.get() 
.
 
It would just appear with a Status 

 of *REMOVED*. By default, when using the get() method, it would return all 
criteria even the removed ones. If you wish to see only the ENABLED 
criterion, you would need to specify the Status to *ENABLED*. 

Sanjay - The explanation in the forum you provided is correct. To 
completely remove the entity, you should remove all entities nested 
underneath it. 

Regards,
Dannison
AdWords API Team

On Monday, September 10, 2018 at 1:26:19 PM UTC+8, yaa...@google.com wrote:
>
> Wondering if any one has seen same issues before, that removed product 
> groups unit are still showing in AdGroupCriterionService.get result. 
>
> We removed some product partitions unit 
> using AdGroupCriterionService.mutate remove operation and checked *Adwords 
> UI which looks good*. Then using AdGroupCriterionService.get to query 
> current partitions, however we found the removed ones are still existed in 
> get result, but their parentCriterionId is None. 
>
> And when we tried to remove those product groups again, it 
> complains EntityNotFound.INVALID_ID. 
>
> Appreciate if any one can provide some suggestions, and wondering if this 
> will cause any issues since from Adwords UI removed product units has been 
> removed correctly. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6ded46c1-3245-404b-8838-67de7356c64a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CONCURRENT_MODIFICATION error creating ResponsiveTextAd

2018-09-10 Thread Scott Clark


[image: 2018-09-09 10_12_14-Start.png]
Having the same issue on responsive ads via AWE (uses API) 

Error message is visible in this dialog box:



On Saturday, September 8, 2018 at 7:38:02 PM UTC-4, j...@stackstorage.co 
wrote:
>
> I am getting repeated CONCURRENT_MODIFICATION errors trying to create a 
> Responsive Text Ad. I checked for the usual causes of this exception 
> according to the documentation and other discussions in this forum, and 
> none of them apply. I can reproduce it trying to create a single ad through 
> the API with nothing else modifying AdWords. Is this a known bug on the 
> server? Thanks.
>
> -Jon
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b000488b-09e1-4f09-82d0-4b9074adb221%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No customer found python error - TrafficEstimatorService Sample

2018-09-10 Thread Raihan Masroor
Hi,

After getting client id, secret token, developer token, and refresh token, 
I'm unable to get execute my code found in 
https://developers.google.com/adwords/api/docs/samples/python/optimization#estimate-keyword-traffic.

After running my code, i get the error: 

main(adwords_client)
  File "estimate-keyword-traffic.py", line 97, in main
estimates = traffic_estimator_service.get(selector)
  File "/home/ubuntu/var/www/adwords_python/googleads/common.py", line 
1391, in MakeSoapRequest
e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: 
[AuthorizationError.NO_CUSTOMER_FOUND @ ]

Anybody know what could be wrong? My developer token is for a test account. 
Could this be an issue?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a0d3eb39-d4cc-42b3-957d-b328235726a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Google Shopping Campaign

2018-09-10 Thread 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Rahul,

To better give you the right information you need, could you confirm if you 
are using the AdWords API in managing your campaigns? Also, could you 
confirm if what you wanted is to exclude the Hindi language in your 
shopping campaign? If so, I'm afraid that it is not possible as the language 

 criteria 
is for positive targeting only.

If my understanding is incorrect, could you provide more context on the 
goal that you want to achieve?

Thanks and regards,
Luis
AdWords API Team

On Monday, September 10, 2018 at 1:26:19 PM UTC+8, rahul wrote:
>
> Hello All,
>
> I am running campaign in India but i dont want to show my ads people 
> search in Hindi Language, so how can i remove those language search from 
> the campaign, i dont see the language option for shopping campaign.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/68c341aa-39a2-403d-bb46-5ef795e22655%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ManagedCustomerService get: different results links vs entries

2018-09-10 Thread Carmine Pagliaro
Hello Dhanya,
the method fails because of a NullPointerException, in partiicular on this 
line:

parentNode.childAccounts.add(childNode);

because we get a null parentNode, we are using a key present in the links 
list but not in the entries list. Why is that? 
Thanks a lot for your support
Kind regards
Carmine

On Friday, September 7, 2018 at 11:18:08 PM UTC+2, Dhanya Sundararaju 
(AdWords API Team) wrote:
>
> Hi Carmine,
>
> The example gets the account hierarchy under the current account. If your 
> current account is a MCC id, this will get all the accounts under that MCC. 
> Could you please elaborate what you mean by 'failure of the method' along 
> with SOAP request and response as well as your client customer id? You may 
> opt to reply privately to author.
>
> Regards,
> Dhanya, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fe828312-578b-4df2-93b7-99601f81b275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why is ConversionTrackerService not returning all conversion?

2018-09-10 Thread 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi,

So I can better investigate the issue you are encountering when retrieving 
your ConversionTrackers 
,
 
could you provide to me your clientCustomerId and the complete SOAP request 
and response that was generated when you made the service call? You may 
send these to me via *Reply privately to author*.

Regards,
Dannison
AdWords API Team

On Monday, September 10, 2018 at 1:26:19 PM UTC+8, Stijn van Lieshout wrote:
>
> I'm trying to use the ConversionTrackerService to retrieve all conversions 
> tracked in an account. The problem is that - seemingly quite randomly - it 
> seems to return only part of the conversions (6 out of 10). Has anyone here 
> had similar experiences? Or might this be a bug I should report?
>
> Here is the definition I use to retrieve the conversions
>
> from googleads import adwords
>
> PAGE_SIZE = 100
>
> def get_conversions(client):
> # Use ConversionTrackerService
> conversion_tracker_service = client.GetService(
> 'ConversionTrackerService', version='v201806') 
>
> # Construct selector and get all accounts.
> offset = 0;
> selector = {
> 'fields': [
> 'Name', 
> 'Status',
> 'Category', 
> 'CountingType', 
> 'DefaultRevenueValue'
> ],
> 'paging': {
> 'startIndex': str(offset),
> 'numberResults': str(PAGE_SIZE)
> }
> }
>
> result = []
> more_pages = True
> while more_pages:
> page = conversion_tracker_service.get(selector)
> if 'entries' in page:
> for conversion in page['entries']:
> result.append({
> "name": conversion['name'], 
> "status": conversion['status'], 
> "category": conversion['category'],
> "countingType": conversion['countingType'], 
> "defaultRevenueValue": conversion[
> 'defaultRevenueValue'],
> })
> else:
> print 'No conversions were found.'
>
> offset += PAGE_SIZE
> selector['paging']['startIndex'] = str(offset)
> more_pages = offset < int(page['totalNumEntries'])
>
> return result
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/27ce1ebb-7d3c-46c5-93cb-53454845a898%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTTP 400 on uploading operations to batch job

2018-09-10 Thread sanjay
Hi Peter,

We have found the issue.

It was one of our database queries was returning an empty list which meant 
we were uploading a empty list of operations to the batch. 

Thanks 
Sanjay

On Sunday, September 9, 2018 at 10:18:50 PM UTC+1, san...@goshift.com wrote:
>
> Hi,
>
> I was wondering if someone (adwords developer preferably) could help me 
> please.
>
> When we upload some operations to a batch job within our production 
> environment to an adwords account we get a HTTP 400 bad request. 
>
> I am confident the request is correct as it works within other 
> environments and for other adwords accounts. 
>
> I could provide more detail in a private message. 
>
> Thanks
> Sanjay
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/86147d2f-5c87-4433-a131-8d176ddaafcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding accounts to MCC via API

2018-09-10 Thread 'Prateek Khandelwal' via AdWords API and Google Ads API Forum
+Janani Karthikeyan 


*  •  **Prateek Khandelwal*

*  •  *Senior Shopping Specialist, EMEA |Google|

*  •  *prat...@google.com

*Catch the latest Shopping updates in the Inside AdWords Blog
*







On Fri, Sep 7, 2018 at 8:50 PM 'Teja Makani' via AdWords API and Google Ads
API Forum  wrote:

> Hello Prateek,
>
> The ManagedCustomerServiceError.TOO_MANY_ACCOUNTS_AT_MANAGER
> 
> means their manager's account has the maximum number of linked accounts. As
> shown in this guide
> 
> the maximum account limits for manager accounts depends on the "Highest
> amount accounts together spent in a month(refer this article
> ), from the last 12
> months". I can see from their manager account that they are about to cross
> the limit of 2,500 accounts. They will be able to increase the maximum
> account limit to 85,000 when the "Highest amount accounts together spent in
> a month, from the last 12 months" is greater than $500,000.
>
> As an alternative they could un link the accounts
>  from their
> manager account that are not needed from their manager account and make
> space for the new accounts. Also, to unlink/terminate links via API they
> could use the managedCustomerService.mutateLink
> 
> operation as shown in the " Manager or client terminates links" section of 
> this
> guide
> 
> .
>
> Please let me know if they have any further questions.
>
> Regards,
> Sai Teja, AdWords API Team.
>
> On Friday, September 7, 2018 at 5:39:33 AM UTC-4, Prateek Khandelwal wrote:
>>
>> Hi All,
>>
>>
>> The client uses the API for adding new accounts. The client wants to add
>> more account to the MCCs via API but he is unable to do it and is getting
>> an error message.
>>
>> *GoogleAdsServerFault:
>> [ManagedCustomerServiceError.TOO_MANY_ACCOUNTS_AT_MANAGER @ operations[0]]*
>>
>> They have a lot of shops we want to add with our own script over the API.
>>  The account spend is more then $300,000 and this makes them to eligible
>> to add account of 2500 as mentioned in this support article
>> .
>>
>>
>>
>>
>> What could be causing this issue?
>>
>>
>> Thanks,
>>
>>
>> Prateek
>>
> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/105979d5-5b5f-4595-bf67-de70b4fd3ed8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 

Re: How to retrieve Adwords accounts under an MCC account using CustomerService?

2018-09-10 Thread 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Stijn,

The CustomerService is a service used only to retrieve account specific 
information. If what you wish is to retrieve information on accounts under 
a specific hierarchy, you will need to use the ManagedCustomerService 

 instead. 
You may note that the CanManageClients 

 field 
is also supported in the ManagedCustomer 

 object 
of the ManagedCustomerService.

I hope this helps and feel free to write back if you need further 
information.

Thanks and regards,
Peter
AdWords API Team

On Monday, September 10, 2018 at 1:26:19 PM UTC+8, Stijn van Lieshout wrote:
>
> I am building an Adwords application with oAuth 2.0 authentication in 
> python. 
>
> I'm able to retrieve all Adwords accounts associated with a google account 
> using the *get_accounts* function below. But now I would like to drill 
> down deeper into the account hierarchy if an account canManageClients (read: 
> mcc account). 
>
> I've already had a look at the Get account hierarchy under the current 
> account 
> 
>  
> but there ManagedCustomerService is used whereas I don't manage these 
> accounts and am using CustomerService instead. 
>
> How to retrieve Adwords accounts under an MCC account using 
> CustomerService?
>
> *How I am currently retrieving accounts:*
>
> from googleads import adwords
>
> def get_accounts(client):
> customer_service = client.GetService('CustomerService', version=
> 'v201806')  
> selector = {
> 'fields': ['customerId', 'descriptiveName', 'canManageClients']
> }
> accounts = customer_service.getCustomers(selector)
>
> result = []
> for account in accounts:
> customerId = account['customerId']
> name = account['descriptiveName']
> canManageClients = account['canManageClients']
> if canManageClients:
> # How to retrieve all accounts under MCC account here?
> result.append({"id": customerId, "name": name, "canManageClients": 
> canManageClients})
> return result
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5e70736d-2ad8-4f50-acd7-c5626d6a4d7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroupCriterionService: can still get removed product partitions.

2018-09-10 Thread sanjay

Could it be related to this? https://bit.ly/2zSYsmQ



On Monday, September 10, 2018 at 6:26:19 AM UTC+1, yaa...@google.com wrote:
>
> Wondering if any one has seen same issues before, that removed product 
> groups unit are still showing in AdGroupCriterionService.get result. 
>
> We removed some product partitions unit 
> using AdGroupCriterionService.mutate remove operation and checked *Adwords 
> UI which looks good*. Then using AdGroupCriterionService.get to query 
> current partitions, however we found the removed ones are still existed in 
> get result, but their parentCriterionId is None. 
>
> And when we tried to remove those product groups again, it 
> complains EntityNotFound.INVALID_ID. 
>
> Appreciate if any one can provide some suggestions, and wondering if this 
> will cause any issues since from Adwords UI removed product units has been 
> removed correctly. 
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2586717c-6998-40f4-aa8c-faf8938943a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "Notes" available through API or script ?

2018-09-10 Thread 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Bestien,

My apologies as we cannot comment if and when such features would be made 
available in future versions of the AdWords API or other related products 
such as AdWords Scripts. You may follow our blog 
 to keep 
yourself up to date on releases, new features, etc.

Best Regards,
Dannison
AdWords API Team

On Sunday, September 9, 2018 at 7:06:08 PM UTC+8, Bastien Rabaute wrote:
>
> Hi,
>
> We use "Notes" to save informations of modifications in our campaigns and 
> account (https://support.google.com/google-ads/answer/7560833?hl=en)
>
> Do you know when it will be available through the API or via Google Ads 
> scripts ?
>
> Thank you
>
> Bastien
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b9d8bda6-6d2f-4872-a4ab-5f9dc6aad4ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Incorrect enums for CampaignState in Campaign Performance Reports

2018-09-10 Thread suvodhoy
Hi Luis,

I understand the usage of the *useRawEnumValues 

 *header. 
My question is that the report documentation 
 
states 
that the values expected will be *ENABLED*, *PAUSED *and *REMOVED* whereas 
the values received are *Status_Active, **Status_Suspended *and *Status_Deleted 
*when the header is set to true. Kindly let me know if I am incorrect in 
assuming *ENABLED*, *PAUSED *and *REMOVED * to be the enum entries. Please 
note this is the case with both *CampaignStatus* and *SharedNegativeStatus*, 
however *AdGroupStatus* returns proper enum values. Sharing the requests 
and response in another private mail. 


On Monday, September 10, 2018 at 11:13:02 AM UTC+5:30, Luis Xander Talag 
(AdWords API Team) wrote:
>
> Hi,
>
> The optional HTTP header *useRawEnumValues 
> 
>  *means 
> that if you set this value to true, the returned format will be the actual 
> enum value of that particular field and if you set it to false or omit this 
> header, the returned format would be the display value as you can see on 
> the report documentation 
> .
>  
> However, to further investigate this, could you provide your 
> clientCustomerId and the complete report definition 
> 
>  you 
> used when you encountered the issue? Please reply via *Reply privately to 
> author*.
>
> Thanks and regards,
> Luis
> AdWords API Team
>
> On Saturday, September 8, 2018 at 1:43:21 PM UTC+8, suvodhoy wrote:
>>
>> Hi,
>>
>> I am trying to fetch the campaigns information through the reports and it 
>> seems to return incorrect values. When *useRawEnumValues * is set to 
>> *True*, it returns values like - *Status_Active* (should be *ENABLED* 
>> according to documentation) and returns *enabled *when *useRawEnumValues 
>> *is set to *False*. Kindly let me if know if this is an expected 
>> functionality or a bug.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/39047c93-da73-499e-901a-71548372d196%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ad in ad performance report segmented by date has empty date field

2018-09-10 Thread Tomas R
What? I am well aware that CSV stands for "comma separated values". I am 
asking what is the escape character used when generating the CSV. There is 
nothing about escape characters in the documentation and no, comma is not 
the escape character. It's either double quotes or backslash.

On Monday, September 10, 2018 at 5:27:27 AM UTC+2, Luis Xander Talag 
(AdWords API Team) wrote:
>
> Hi Tomas,
>
> The Adwords API uses comma separated escape character for csv output 
> format. You may refer to this guide 
> 
>  for 
> other supported download formats.
>
> Regards,
> Luis
> AdWords API Team
>
> On Friday, September 7, 2018 at 8:24:59 PM UTC+8, Tomas R wrote:
>>
>> What's the escape character used by AdWords reporting API when exporting 
>> CSV file? Is it backslash or double quote character?
>>
>> On Friday, September 7, 2018 at 10:32:17 AM UTC+2, Tomas R wrote:
>>>
>>> Hi Luis,
>>>
>>> We found the problem. The  reporting API is returning improperly 
>>> formatted CSV document, because it doesn't escape backslashes, which causes 
>>> two columns to be merged into one when there is a backslash at the end of 
>>> the cell value.
>>>
>>>
>>> On Thursday, September 6, 2018 at 9:59:25 AM UTC+2, Luis Xander Talag 
>>> (AdWords API Team) wrote:

 Hi Tomas,

 To further investigate the problem, can you provide the 
 clientCustomerId and the complete report definition 
 
  you 
 used to generate the report? Please reply via *Reply privately to 
 author*.


 Best Regards,
 Luis
 AdWords API Team

 On Thursday, September 6, 2018 at 2:50:44 PM UTC+8, Tomas R wrote:
>
> Hi,
>
> Today we noticed an unusual response from AdWords reporting API. One 
> of the "expanded text ads" in ad performance report segmented by date had 
> an empty value for the date field. Can you explain why that would happen?
>


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b348d106-86f1-4546-8568-4af9e001df99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CONCURRENT_MODIFICATION error creating ResponsiveTextAd

2018-09-10 Thread 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi Jon,

The DatabaseError.CONCURRENT_MODIFICATION 

 error 
that you encountered could occur due to multiple processes that are trying 
to update the same entity at the same time. It includes a user in the 
AdWords web interface that is updating the entity while you are updating as 
well via the API. However, to further investigate your issue, could you 
please send to me (via *reply privately to author*) the complete SOAP 
request and response logs of the operation which returns this error?

Thanks and regards,
Luis
AdWords API Team

On Monday, September 10, 2018 at 7:10:01 AM UTC+8, jon wrote:
>
> The AdWords UI also has a bug in it where it drops one of the headlines. 
> My guess is that there is an off-by-one error in the Ads backend which is 
> manifesting as a CONCURRENT_MODIFICATION at the API level and a dropped 
> headline in the Ads UI interface. I figured out how to workaround the 
> off-by-one error in the UI by adding one more headline than I actually 
> want. Beta feature right? :-) 
>
> -Jon
>
> On Saturday, September 8, 2018 at 4:38:02 PM UTC-7, j...@stackstorage.co 
> wrote:
>>
>> I am getting repeated CONCURRENT_MODIFICATION errors trying to create a 
>> Responsive Text Ad. I checked for the usual causes of this exception 
>> according to the documentation and other discussions in this forum, and 
>> none of them apply. I can reproduce it trying to create a single ad through 
>> the API with nothing else modifying AdWords. Is this a known bug on the 
>> server? Thanks.
>>
>> -Jon
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/985013c7-54d8-490f-a7b3-6b20df55ebc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.