Thanks for quick response, let me check with it. Now am looking to setup API for reporting started with campaign performance. I have done with the sample provided and report is fetching from API, i just want to convert report data into array to render in UI table. Can you please let me know how to do it.
/** * Downloads CRITERIA_PERFORMANCE_REPORT for the specified client customer ID. */ class DownloadCriteriaReportWithAwql { public static function runExample(AdWordsSession $session, $reportFormat) { // Create report query to get the data for last 7 days. $query = (new ReportQueryBuilder()) ->select([ 'CampaignId', 'CampaignName', 'CampaignStatus', 'Impressions', 'Clicks', 'Cost' ]) ->from(ReportDefinitionReportType::CAMPAIGN_PERFORMANCE_REPORT) ->where('CampaignStatus')->in(['ENABLED', 'PAUSED']) ->duringDateRange(ReportDefinitionDateRangeType::LAST_7_DAYS) ->build(); // Download report as a string. $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(true) ->build(); $reportDownloadResult = $reportDownloader->downloadReportWithAwql( sprintf('%s', $query), $reportFormat, $reportSettingsOverride ); // print_r($reportDownloadResult); print "Report was downloaded and printed below:\n"; print $reportDownloadResult->getAsString(); } public static function index() { // 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(); self::runExample($session, DownloadFormat::CSV); } } DownloadCriteriaReportWithAwql::index(); On Thursday, July 30, 2020 at 6:52:04 PM UTC+5:30, adsapiforumadvisor wrote: > > Hi, > > You can follow this sample > <https://developers.google.com/adwords/api/docs/samples/php/miscellaneous#upload-an-image-asset> > > for uploading an image asset. It looks like you are setting the assetId > instead of the assetData in your code. > > Regards, > Mitchell > Google Ads API Team > > ref:_00D1U1174p._5004Q22ZyiL: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/ea408071-628c-486d-b8ca-cdaf5e3cbfd4o%40googlegroups.com.