Hey All,
Our client who used the Adwords API is getting a 401 error. They suspect
this has to do with an email address connected to AdWords and AdWords API
that may have been removed.
Any first recommendations on where we can start troubleshooting? Details
below!
Thanks for your time!
Anthony
*Request:*
Dim report As New AdwordsAPI.ReportDefinition() With {
.reportType =
AdwordsAPI.ReportDefinitionReportType.ADGROUP_PERFORMANCE_REPORT,
.downloadFormat = AdwordsAPI.DownloadFormat.CSV,
.dateRangeType =
AdwordsAPI.ReportDefinitionDateRangeType.LAST_7_DAYS,
.selector = New AdwordsAPI.Selector() With {
.fields = {"CampaignId", "CampaignName", "AdGroupId",
"AdGroupName", "AverageCpc", "Clicks", "Impressions", "Cost", "Ctr",
"Date", "DayOfWeek", "ConversionValue", "Conversions", "Device",
"SearchImpressionShare", "SearchRankLostImpressionShare",
"ContentImpressionShare", "ContentRankLostImpressionShare",
"SearchExactMatchImpressionShare"},
.predicates = {predicate}
}
}
Dim utilities As New ReportUtilities(user, "v201509", report)
Using reportResponse As ReportResponse = utilities.GetResponse()
*-->code
breaks here, when it tries to connect to api and get report.*
reportResponse.Save(fileNamePath)
End Using
*Response: *
Google.Api.Ads.AdWords.Util.Reports.AdWordsReportsException:
AdWordsReportsException: One or more AdWords Report download errors have
occurred.
---> System.Net.WebException: The remote server returned an error: (401)
Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String
downloadUrl, String postBody)
--- End of inner exception stack trace ---
at
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String
downloadUrl, String postBody)
at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetReport()
at Google.Api.Ads.Common.Util.Reports.AdsReportUtilities.GetResponse()
at GoogleAW.BasicReport.DownloadReportFile(AdWordsUser user,
ReportDefinition report, String fileNamePath) in
C:\CymaxProjects\Cymax\Development\GoogleAW\GoogleAW\GoogleAW\Code\Services\Reports\BasicReport.vb:line
106
at GoogleAW.BasicReport.GetReport(AdWordsUser user, AdwordsReportType
type, Predicate predicate, Boolean doImportReportIntoDB, Boolean hasStats)
in
C:\CymaxProjects\Cymax\Development\GoogleAW\GoogleAW\GoogleAW\Code\Services\Reports\BasicReport.vb:line
53
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8532984c-2157-4d1a-8c55-5051e26e33b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.