Hi, Can you explain what you are trying to accomplish with this code? What are your goals, and what is failing?
Best, - Eric On Jan 26, 5:09 am, ipsita rout <afixi.ips...@gmail.com> wrote: > I need to clear one other problem > My code is > $email = "MCC a/c email"; > $password = "MCC a/c pwd"; > $useragent = "Ipsita Test Sample"; > $applicationToken = "app token";//Ignored in Sandbox > $account_type = "GOOGLE"; > $service = "adwords"; > $clientEmail = "$email"; > $namespace = 'https://adwords.google.com/api/adwords/v13'; > $developerToken = 'dev token'; > $clientEmails = > array("array of emails get through > $account_service = SoapClientFactory::GetClient($namespace . '/ > AccountService?wsdl', 'wsdl'); > $account_service->setHeaders($headers); > $debug = 0; > //$login_emails = $account_service->call('getClientAccounts'); > //$login_emails = $login_emails['getClientAccountsReturn']; > $login_emails = $account_service->call('getClientAccountInfos'); > $login_emails = $login_emails['getClientAccountInfosReturn']; > "); > $clientEmailsXml = ''; > foreach($clientEmails as $clientEmail) { > $clientEmailsXml .= > "<clientEmails>" . trim($clientEmail) . "</ > clientEmails>"; > } > # Define SOAP headers. > $headers = > '<email>'.$email.'</email>'. > '<password>'.$password.'</password>'. > '<useragent>'.$useragent.'</useragent>'. > '<developerToken>'.$developerToken.'</developerToken>'. > '<applicationToken>'.$applicationToken.'</applicationToken>'; > $report_service = SoapClientFactory::GetClient($namespace . '/ > ReportService?wsdl', 'wsdl'); > $report_service->setHeaders($headers); > $report_job = > '<selectedReportType>Campaign</selectedReportType>'. > '<name>Sample Keyword Report</name>'. > '<crossClient>true</crossClient>'. > $clientEmailsXml. > '<aggregationTypes>Daily</aggregationTypes>'. > '<adWordsType>ContentOnly</adWordsType>'. > '<keywordType>Broad</keywordType>'. > '<startDay>2004-06-20</startDay>'. > '<endDay>2037-12-30</endDay>'. > '<selectedColumns>Impressions</selectedColumns>'. > '<selectedColumns>Clicks</selectedColumns>'. > '<selectedColumns>CTR</selectedColumns>'. > '<selectedColumns>CPC</selectedColumns>'; > $request_xml = > '<validateReportJob>'. > '<job xmlns:impl="https://adwords.google.com/api/adwords/v13" '. > 'xsi:type="impl:DefinedReportJob">'.$report_job.'</job>'. > '</validateReportJob>'; > # Validate report. > $report_service->call('validateReportJob', $request_xml); > print '<pre>';print_r($report_service);exit; > In the response array one statement i got > [document] => > soapenv:Server.userException > One or more report job parameters is invalid. > 30 > One or more report job parameters is invalid. > The following columns are not supported by the Report Type > Campaign : [KeywordTypeDisplay] > When I changed $clientEmailsXml. to > '<clientEmails></clientEmails>'. > in the above code I got > [document] => > soapenv:Server.userException > Either this object does not exist, or this user does not have > permission to access it. > 4 > Either this object does not exist, or this user does not have > permission to access it. > Can u plz tell me where I am wrong? > > On Jan 25, 8:37 pm, AdWords API Advisor <adwordsapiadvi...@google.com> > wrote: > > > > > Hi, > > > Unfortunately there is no way to run reports through the API without > > using the ReportService.scheduleReportJob() method. Because > > misconfigured reports are still charged at full price it is wise to > > run ReportService.validateReportJob() first to ensure it is a valid > > report. There is no way to avoid spending these API units. > > > Best, > > - Eric Koleda, AdWords API Team > > > On Jan 24, 8:22 am, ipsita rout <afixi.ips...@gmail.com> wrote: > > > > Hi to those who are going to help me > > > My client has the MCC registered A/C and wants to see the records of > > > all his clients by dynamically choosing the options.Again he needs an > > > interface where multiple select options ,each belong to multiple > > > aggregation type and multiple reports type. > > > For example > > > he through the interface he'll select lets say "Account" type ,then > > > select 5 to 6 options from each of the aggregation types [here his > > > report belongs to more than one aggregation types and each aggregation > > > type has more than one options] > > > then he select "Campaign" and same thing > > > then he select something out of other report tupe and then he runs the > > > report. > > > I can do it by validating and then scheduling that report and finally > > > making the downloding the XML file. > > > But in this process my client has to afford so many API units.Is there > > > any shortcut method or any other alternatives of schedule report > > > option to make it economic. > > > Plz reply -- 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-...@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.