获取Adwords MCC的问题

时间:2016-10-31 12:54:13

标签: c# .net google-adwords

我在google" AdWords API v201509日落提醒"版本v201509于2016年2月2日弃用。

AdWords API v201509 sunset reminder

我构建了一个功能,可以检查我的Adwords MCC是否有效:

public string IsAdwordsMCCValid(string mcc)
    {
        bool isAuthenticated = CheckAdwordsAuthentication();
        if (!isAuthenticated)
        {
            return AdwordsErrors.OAuthNull.ToString();
        }
        AdWordsUser tempUser = adWordsUser;
        (tempUser.Config as AdWordsAppConfig).ClientCustomerId = mcc;
        CampaignService campaignService=(CampaignService)tempUser.GetService(AdWordsService.v201509.CampaignService);

        Selector selector = new Selector();
        selector.fields = new string[] {
    "Id", "Name"
  };

        try
        {
            campaignService.get(selector); **
            ModifyMCC(mcc.Trim());
            return "success";
        }
        catch (Exception e)
        {
        }
        return "not valid";
    }

当我到达**行时,我得到一个例外:"请求失败,HTTP状态为404:Not Found。"

在这行代码中有什么我需要改变的吗? :

 CampaignService campaignService=(CampaignService)tempUser.GetService(AdWordsService.v201509.CampaignService);

提前致谢!

0 个答案:

没有答案