Re: v201109 == v201206 reporting issues
Hi, I was able to run a v201206 report using the example XML you included here. Can I ask you to double check the report download endpoint matches the version in the XML? Assuming they do, could you post as much of the HTTP error response as you can? - Kevin Winter AdWords API Team On Wednesday, August 22, 2012 7:29:11 PM UTC-4, dkasak wrote: Hmmm. Thanks jayshree but we're not using PHP, and this doesn't really explain why things have broken in v201206. Official comments? On Wednesday, August 22, 2012 3:27:19 PM UTC+10, jayshree bhongle wrote: You can try this code.It gives me the output properly $username = ; $password = ; $customerId = ; $devToken = ; // Get an access code for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $curlData = curl_exec($curl); curl_close($curl); // Parse the response $curlData = explode(\n, $curlData); $return = array(); foreach ($curlData as $value) { $value = explode(=, $value, 2); if (count($value) 1) { $return[$value[0]] = $value[1]; } } // Extract the access token $authToken = $return[Auth]; # $httpHeaders = array( Authorization: GoogleLogin auth=$authToken, clientCustomerId: $customerId, developerToken: $devToken ); $reportDefinition = 'reportDefinition selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType dateRangeTypeLAST_14_DAYS/dateRangeType downloadFormatXML/downloadFormat /reportDefinition'; $params = array(__rdxml = $reportDefinition); # $url = https://adwords.google.com/api/adwords/reportdownload/v201206 ; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeaders); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $reportData = curl_exec($curl); curl_close($curl); print $reportData\n; On Wednesday, August 22, 2012 7:28:51 AM UTC+5:30, dkasak wrote: Hi all. I'm working on updating our code to v201206 and I'm getting errors when doing ad-hoc reports. An example of a request that works: URL: https://adwords.google.com/api/adwords/reportdownload/v201109 Definition: reportDefinition xmlns= https://adwords.google.com/api/adwords/cm/v201109; selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields
Re: v201109 == v201206 reporting issues
On Ago 26th My code stopped to work. Someone knows something about it? I'm using php 201109 Thanks -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: v201109 == v201206 reporting issues
Hmmm. Thanks jayshree but we're not using PHP, and this doesn't really explain why things have broken in v201206. Official comments? On Wednesday, August 22, 2012 3:27:19 PM UTC+10, jayshree bhongle wrote: You can try this code.It gives me the output properly $username = ; $password = ; $customerId = ; $devToken = ; // Get an access code for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $curlData = curl_exec($curl); curl_close($curl); // Parse the response $curlData = explode(\n, $curlData); $return = array(); foreach ($curlData as $value) { $value = explode(=, $value, 2); if (count($value) 1) { $return[$value[0]] = $value[1]; } } // Extract the access token $authToken = $return[Auth]; # $httpHeaders = array( Authorization: GoogleLogin auth=$authToken, clientCustomerId: $customerId, developerToken: $devToken ); $reportDefinition = 'reportDefinition selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType dateRangeTypeLAST_14_DAYS/dateRangeType downloadFormatXML/downloadFormat /reportDefinition'; $params = array(__rdxml = $reportDefinition); # $url = https://adwords.google.com/api/adwords/reportdownload/v201206 ; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeaders); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $reportData = curl_exec($curl); curl_close($curl); print $reportData\n; On Wednesday, August 22, 2012 7:28:51 AM UTC+5:30, dkasak wrote: Hi all. I'm working on updating our code to v201206 and I'm getting errors when doing ad-hoc reports. An example of a request that works: URL: https://adwords.google.com/api/adwords/reportdownload/v201109 Definition: reportDefinition xmlns= https://adwords.google.com/api/adwords/cm/v201109; selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields
Re: v201109 == v201206 reporting issues
You can try this code.It gives me the output properly $username = ; $password = ; $customerId = ; $devToken = ; // Get an access code for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $curlData = curl_exec($curl); curl_close($curl); // Parse the response $curlData = explode(\n, $curlData); $return = array(); foreach ($curlData as $value) { $value = explode(=, $value, 2); if (count($value) 1) { $return[$value[0]] = $value[1]; } } // Extract the access token $authToken = $return[Auth]; # $httpHeaders = array( Authorization: GoogleLogin auth=$authToken, clientCustomerId: $customerId, developerToken: $devToken ); $reportDefinition = 'reportDefinition selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType dateRangeTypeLAST_14_DAYS/dateRangeType downloadFormatXML/downloadFormat /reportDefinition'; $params = array(__rdxml = $reportDefinition); # $url = https://adwords.google.com/api/adwords/reportdownload/v201206;; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeaders); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $reportData = curl_exec($curl); curl_close($curl); print $reportData\n; On Wednesday, August 22, 2012 7:28:51 AM UTC+5:30, dkasak wrote: Hi all. I'm working on updating our code to v201206 and I'm getting errors when doing ad-hoc reports. An example of a request that works: URL: https://adwords.google.com/api/adwords/reportdownload/v201109 Definition: reportDefinition xmlns= https://adwords.google.com/api/adwords/cm/v201109; selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType