RE: DownloadCriteriaReportWithSelector Error

2020-02-18 Thread Google Ads API Forum Advisor Prod
Hello Julian,

Thank you for reaching out.  With AdWords API, it is only possible to download 
the report against one client customer account at a time. You need to implement 
the logic on your end to iterate over more than one client customer id to 
download these reports. Let us know if you need any additional information.

Regards,
Nikisha Patel, Google Ads API Team
ref:_00D1U1174p._5001UV1Nw5: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/Ig7ye0Q5X2J900yXs8qAaMQP2tkBEEURXFbw%40sfdc.net.


Re: DownloadCriteriaReportWithSelector Error

2020-02-18 Thread Julian Woywad
Thank you for this answer.

Is there a way to get DownloadCriteriaReportWithSelector results for all or 
at least several of your accounts at once, or can I only pull from one 
client ID at a time?  

Right now the Selectors work fine as long as I only use one client ID and 
as long as its not a manager-account. 
However I need to pull from more than just one account and the number is 
increasing, so is there an easy way to just get 'all of them'?
Working in PHP.

Thank you

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4bafd246-c0d5-4858-b65d-77f352ae6355%40googlegroups.com.


Re: DownloadCriteriaReportWithSelector Error

2018-02-14 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Dominik,

PHP 5.5.9 and higher is a requirement for the new PHP client library. 
Please refer this 

 guide 
for more details. Could you please update PHP version and check? Let me 
know if you have any further question.

Thanks,
Milind, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/5be81959-073f-4fe2-84d3-d954c1920522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DownloadCriteriaReportWithSelector Error

2018-02-14 Thread Dominik Raffetseder
Okay, is working now.
But when i do this again, i get always this error:

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in 
/usr/share/nginx/www/adwords/googleads-php-lib/vendor/symfony/serializer/Normalizer/GetSetMethodNormalizer.php
 
on line 59



Am Montag, 12. Februar 2018 21:19:42 UTC+1 schrieb Milind Sankeshware 
(AdWords API Team):
>
> Hi Dominik,
>
> In version 201702, the behavior of this report functionality is same as in 
> version 201710. To obtain the report, you have to run against the 
> non-manager account. The ManagedCustomerService 
> 
>  can 
> be used to get account information, and if 
> ManagedCustomer.canManageClients 
> 
>  is 
> true then the account is a manager account. Let me know if you have further 
> questions.
>
> Thanks,
> Milind, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/b9accd51-4205-42bc-a338-4550f7b2e8a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DownloadCriteriaReportWithSelector Error

2018-02-12 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Dominik,

In version 201702, the behavior of this report functionality is same as in 
version 201710. To obtain the report, you have to run against the 
non-manager account. The ManagedCustomerService 

 can 
be used to get account information, and if ManagedCustomer.canManageClients 

 is 
true then the account is a manager account. Let me know if you have further 
questions.

Thanks,
Milind, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/f49d78e6-6eb9-4f5d-ba10-8545bf1fa3bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DownloadCriteriaReportWithSelector Error

2018-02-12 Thread Dominik Raffetseder
Is this a new problem?
In Version 201702 it worked in that way?
its complicated to do it for each account at its own?


Am Montag, 12. Februar 2018 18:04:57 UTC+1 schrieb Milind Sankeshware 
(AdWords API Team):
>
> Hi Dominik,
>
> I see that you are getting CUSTOMER_SERVING_TYPE_REPORT_MISMATCH 
> 
>  while 
> trying to run the report. It is because you are trying to run a report 
> against a manager account. Reports can be obtained only at the non-manager 
> account level. In your case, you are using manager account id 608-580-1167. 
> Could you please rerun the report with non-manager account and let me know 
> how it goes?
>
> Thanks,
> Milind, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/f558fd80-095c-4f9a-8ff9-b0f643ed8b27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: DownloadCriteriaReportWithSelector Error

2018-02-12 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Dominik,

I see that you are getting CUSTOMER_SERVING_TYPE_REPORT_MISMATCH 

 while 
trying to run the report. It is because you are trying to run a report 
against a manager account. Reports can be obtained only at the non-manager 
account level. In your case, you are using manager account id 608-580-1167. 
Could you please rerun the report with non-manager account and let me know 
how it goes?

Thanks,
Milind, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/0ea8fc53-e9f4-499a-b030-234214507108%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


DownloadCriteriaReportWithSelector Error

2018-02-12 Thread Dominik Raffetseder
I want to do some reporting, but always get this error. How can i solve?

class DownloadCriteriaReportWithSelector {

  public static function runExample(AdWordsSession $session, $filePath) {
// Create selector.
$selector = new Selector();
$selector->setFields(['CampaignId']);

// Use a predicate to filter out paused criteria (this is optional).
$selector->setPredicates([
new Predicate('Status', PredicateOperator::NOT_IN, ['PAUSED'])]);

// Create report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition->setSelector($selector);
$reportDefinition->setReportName(
'Criteria performance report #' . uniqid());
$reportDefinition->setDateRangeType(
ReportDefinitionDateRangeType::LAST_7_DAYS);
$reportDefinition->setReportType(
ReportDefinitionReportType::CRITERIA_PERFORMANCE_REPORT);
$reportDefinition->setDownloadFormat(DownloadFormat::CSV);

// Download report.
$reportDownloader = new ReportDownloader($session);
// Optional: If you need to adjust report settings just for this one
// request, you can create and supply the settings override here. 
Otherwise,
// default values from the configuration file (adsapi_php.ini) are used.
$reportSettingsOverride = (new ReportSettingsBuilder())
->includeZeroImpressions(false)
->build();
$reportDownloadResult = $reportDownloader->downloadReport(
$reportDefinition, $reportSettingsOverride);
$reportDownloadResult->saveToFile($filePath);
printf("Report with name '%s' was downloaded to '%s'.\n",
$reportDefinition->getReportName(), $filePath);
  }

  public static function main() {
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build();

// See: AdWordsSessionBuilder for setting a client customer ID that is
// different from that specified in your adsapi_php.ini file.
// Construct an API session configured from a properties file and the 
OAuth2
// credentials above.
$session = (new AdWordsSessionBuilder())
->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();

$filePath = sprintf(
'%s.csv',
tempnam(sys_get_temp_dir(), 'criteria-report-')
);
self::runExample($session, $filePath);
  }
}

DownloadCriteriaReportWithSelector::main();



Following the error:

Dominiks-iMac:adwords Dominik$ php DownloadCriteriaReportWithSelector.php

[2018-02-12 12:22:51] AW_REPORT_DOWNLOADER.WARNING: 
clientCustomerId=608-580-1167 ## (AwApi-PHP, googleads-php-lib/32.1.0, 
PHP/7.1.11, GuzzleHttp/6.2.1, curl/7.45.0) "POST 
/api/adwords/reportdownload/v201710 HTTP/1.1" Status: 400   

[2018-02-12 12:22:51] AW_REPORT_DOWNLOADER.NOTICE: Request:

POST /api/adwords/reportdownload/v201710 HTTP/1.1

Content-Type: application/x-www-form-urlencoded

Host: adwords.google.com

Authorization: REDACTED

developerToken: REDACTED

clientCustomerId: #

User-Agent:  (AwApi-PHP, googleads-php-lib/32.1.0, PHP/7.1.11, 
GuzzleHttp/6.2.1, curl/7.45.0)

skipReportHeader: false

skipColumnHeader: false

skipReportSummary: false

useRawEnumValues: false

includeZeroImpressions: false


__rdxml=

CampaignIdStatusNOT_INPAUSEDCriteria
 
performance report 
#5a81790a0c817CRITERIA_PERFORMANCE_REPORTLAST_7_DAYSCSV



Response:

REDACTED REPORT DATA



Error:

Client error: `POST 
https://adwords.google.com/api/adwords/reportdownload/v201710` resulted in 
a `400 Bad Request` response

  

PHP Fatal error:  Uncaught Google\AdsApi\AdWords\v201710\cm\ApiException: 
Details: [fieldPath: selector.reportDefinition; trigger: ; errorString: 
ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH] in 
/Applications/XAMPP/xamppfiles/htdocs/crm/adwords/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201710/ReportDownloader.php:168

Stack trace:

#0 
/Applications/XAMPP/xamppfiles/htdocs/crm/adwords/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201710/ReportDownloader.php(106):
 
Google\AdsApi\AdWords\Reporting\v201710\ReportDownloader->makeReportRequest(Array)

#1 
/Applications/XAMPP/xamppfiles/htdocs/crm/adwords/DownloadCriteriaReportWithSelector.php(68):
 
Google\AdsApi\AdWords\Reporting\v201710\ReportDownloader->downloadReport(Object(Google\AdsApi\AdWords\Reporting\v201710\ReportDefinition),
 
Object(Google\AdsApi\AdWords\ReportSettings))

#2 
/Applications/XAMPP/xamppfiles/htdocs/crm/adwords/DownloadCriteriaReportWithSelector.php(93):
 
Google\AdsApi\Examples\AdWords\v201710\Reporting\DownloadCriteriaReportWithSel 
in 
/Applications/XAMPP/xamppfiles/htdocs/crm/adwords/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201710/ReportDownloader.php
 
on line 168


Fatal error: Uncaught Google\AdsApi\AdWords\v201710\cm\ApiException: 
Details: [fieldPath: selector.reportDefinition; trigger: ; errorString: