本文介绍了Bing Ads报告服务“身份验证失败”沙箱环境中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


问题:我在沙盒中测试V8报告服务。但它抛出"身份验证失败。提供的凭证无效或帐户处于非活动状态"每次例外。


注意:


1。我可以在沙箱用户界面中添加/修改广告系列。 


2。此帐户状态正在等待处理根据UI消息,需要将支付方法添加到此帐户以使其处于活动状态。但我不知道如何添加付款方式。沙箱中的帐户不需要在沙盒中添加
到MSDN的付款方式。所以看起来很困惑。


详细信息:


我的代码:


               使用(ReportingServiceClient服务=新的ReportingServiceClient())

                {

                    SubmitGenerateReportRequest request = new SubmitGenerateReportRequest();

                    SubmitGenerateReportResponse response = null;



                    request.DeveloperToken =" *** Masked ***"; $
                    request.UserName =" *** Masked ***"; $
                    request.Password =" *** Masked ***"; $


                    request.CustomerId =" *** Masked ***"; $
                    request.CustomerAccountId =" *** Masked ***"; $
                    KeywordPerformanceReportRequest reportRequest = new KeywordPerformanceReportRequest();

                    reportRequest.Format = ReportFormat.Xml;

                    reportRequest.Language = ReportLanguage.English;

                    reportRequest.ReturnOnlyCompleteData = false;



                    reportRequest.Aggregation = ReportAggregation.Daily;

                    reportRequest.Columns =新KeywordPerformanceReportColumn [] {KeywordPerformanceReportColumn.TimePeriod,KeywordPerformanceReportColumn.AccountName,KeywordPerformanceReportColumn.CurrentMaxCpc,
KeywordPerformanceReportColumn.AverageCpc,KeywordPerformanceReportColumn.AveragePosition,KeywordPerformanceReportColumn.Clicks,KeywordPerformanceReportColumn.Impressions,KeywordPerformanceReportColumn.Spend,KeywordPerformanceReportColumn.Ctr};

                    AccountThroughAdGroupReportScope scope = new AccountThroughAdGroupReportScope();

                    scope.AccountIds = new long [] {*** Masked ***};

                    reportRequest.Scope = scope;

                    reportRequest.Time = new ReportTime();



                   日期aa =新日期();

                    aa.Day = 1; aa.Month = 6; aa.Year = 2013;

                    reportRequest.Time.CustomDateRangeStart = aa;

                   日期bb =新日期();

                    bb.Day = 13; bb.Month = 8; bb.Year = 2013;

                    reportRequest.Time.CustomDateRangeEnd = bb;



                    request.ReportRequest = reportRequest;



                    response = service.SubmitGenerateReport(request);



                    return response.ReportRequestId;


         }


报告服务地址:


https://api.sandbox.bingads.microsoft.com/Api/Advertiser/v8/Reporting /ReportingService.svc?wsdl

解决方案

Hi, 

Question: I test V8 reporting service in sandbox. But it throw "Authentication failed. Either supplied credentials are invalid or the account is inactive" exception every time.

Notes:

1. I can add/edit campaign in sandbox UI. 

2. This account status is pending. According to UI message, payment method need to be added to this account to make it active. But I do not find out how to add payment method. And accounts in sandbox does not need to add payment method in Sandbox according to MSDN. So it seems very confused.

Details:

My code:

                using (ReportingServiceClient service = new ReportingServiceClient())
                {
                    SubmitGenerateReportRequest request = new SubmitGenerateReportRequest();
                    SubmitGenerateReportResponse response = null;

                    request.DeveloperToken = "***Masked***";
                    request.UserName = "***Masked***";
                    request.Password = "***Masked***";

                    request.CustomerId = "***Masked***";
                    request.CustomerAccountId = "***Masked***";
                    KeywordPerformanceReportRequest reportRequest = new KeywordPerformanceReportRequest();
                    reportRequest.Format = ReportFormat.Xml;
                    reportRequest.Language = ReportLanguage.English;
                    reportRequest.ReturnOnlyCompleteData = false;

                    reportRequest.Aggregation = ReportAggregation.Daily;
                    reportRequest.Columns = new KeywordPerformanceReportColumn[] { KeywordPerformanceReportColumn.TimePeriod, KeywordPerformanceReportColumn.AccountName, KeywordPerformanceReportColumn.CurrentMaxCpc, KeywordPerformanceReportColumn.AverageCpc, KeywordPerformanceReportColumn.AveragePosition, KeywordPerformanceReportColumn.Clicks, KeywordPerformanceReportColumn.Impressions, KeywordPerformanceReportColumn.Spend, KeywordPerformanceReportColumn.Ctr };
                    AccountThroughAdGroupReportScope scope = new AccountThroughAdGroupReportScope();
                    scope.AccountIds = new long[] { ***Masked***};
                    reportRequest.Scope = scope;
                    reportRequest.Time = new ReportTime();

                    Date aa = new Date();
                    aa.Day = 1; aa.Month = 6; aa.Year = 2013;
                    reportRequest.Time.CustomDateRangeStart = aa;
                    Date bb = new Date();
                    bb.Day = 13; bb.Month = 8; bb.Year = 2013;
                    reportRequest.Time.CustomDateRangeEnd = bb;

                    request.ReportRequest = reportRequest;

                    response = service.SubmitGenerateReport(request);

                    return response.ReportRequestId;

         }

Report service address:

https://api.sandbox.bingads.microsoft.com/Api/Advertiser/v8/Reporting/ReportingService.svc?wsdl

解决方案


这篇关于Bing Ads报告服务“身份验证失败”沙箱环境中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 08:25