Hi All,

I am using Adwords API to get campaign performance report but there was no 
data to return. Here is my code 

define('CLIENT_ID', 'MY_CLIENT_ID');
define('CLIENT_SECRET', 'MY_CLIENT_SECRET');

define('REFRESH_TOKEN', 'MY_REFRESH_TOKEN');
define('DEVELOPER_TOKEN', 'MY_DEVELOPER_TOKEN');
define('USER_AGENT', 'MY_COMPANY');

$oauth2Info = array(
    'client_id' => CLIENT_ID,
    'client_secret' => CLIENT_SECRET,
    'refresh_token' => REFRESH_TOKEN
  );

$user = new AdWordsUser(null, DEVELOPER_TOKEN, USER_AGENT, null, null,
$oauth2Info);
$user->SetClientCustomerId('MY_ID');//this is my sub client-customer id
// Log every SOAP XML request and response.
$user->LogAll();

$user->LoadService('ReportDefinitionService', ADWORDS_VERSION);
$selector = new Selector();
  $selector->fields = array('AccountCurrencyCode', 'AccountDescriptiveName', 
'AccountTimeZoneId', 'ActiveViewCpm',
      'ActiveViewCtr', 'ActiveViewImpressions', 'ActiveViewMeasurability', 
'ActiveViewMeasurableCost');

$reportDefinition = new ReportDefinition();
$reportDefinition->selector = $selector;
$reportDefinition->reportName = 'Criteria performance report #' . uniqid();
$reportDefinition->dateRangeType = 'LAST_7_DAYS';
$reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'CSV';

$options = array('version' => ADWORDS_VERSION);

$reportUtils = new ReportUtils();
$reportUtils->DownloadReport($reportDefinition, "report.csv", $user, 
$options);

However when I tried to use get campaign as shows in GetCampaign.php it 
works. I also tried to change different client customer id between parent 
and sub bot none works. 

Thank You

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/42d481b6-54c6-4c34-af91-335cc7b5e0f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to