I've got the solution.

On Dec 21, 4:06 pm, Minh Le <[email protected]> wrote:
> I am doing migration from Google Adwords API v200909 to v201109. Now I
> have some troubles with my code in a .NET project:
>
> private void StoreCampaignInDB(string campaign_email, string
> campaign_password, string clientEmail, int AccountID, StringBuilder
> sDailyReport)
>         {
>             try
>             {
>                 AdWordsAppConfig config = new AdWordsAppConfig();
>                 AuthToken authToken = new AuthToken(config,
> AdWordsSoapClient.SERVICE_NAME, campaign_email, campaign_password);
>                 string token = authToken.GetToken();
>
>                 CampaignService campaignService = new
> CampaignService();
>
>                 campaignService.Url = "https://adwords.google.com/api/
> adwords/cm/v201109/CampaignService";
>                 campaignService.RequestHeader = new RequestHeader();
>                 campaignService.RequestHeader.authToken = token;
>                 //campaignService.RequestHeader.clientEmail =
> clientEmail;
>                 //campaignService.RequestHeader.clientCustomerId =
> "xxx-xxx-xxx"; // I used the customer ID
>                 campaignService.RequestHeader.developerToken =
> ConfigurationManager.AppSettings["developerToken"];
>                 //campaignService.RequestHeader.Version = "v201109";
>
>                 //Create a selector.
>                 Selector selector = new Selector();
>                 //selector.fields = new string[] { "id", "name",
> "status" };
>
>                 CampaignPage page =
> campaignService.get(selector);
>
>                 if (page.entries != null)
>                 {
>                    //some code here
>                  }
>             }
>             catch (Exception ex)
>             {
>                 Console.WriteLine("StoreCampaignInDB:" +
> ex.ToString(), Logger.MsgTypeEnum.Error);
>                 //Logger.LogThis("StoreCampaignInDB:" + ex.ToString(),
> Logger.MsgTypeEnum.Error);
>             }
>         }
>
> I got some errors here:
>
> - "ClientEmail header is not supported in v201109"
>            if I uncomment this line:
>                campaignService.RequestHeader.clientEmail
> - "Email cannot be null" if I run the above method even when I
> uncomment the line using clientCustomerId
> - Error thrown when accessing line
>            CampaignPage page = campaignService.get(selector);
>
> Could anyone help me to solve the issues?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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

Reply via email to