locked
BingAds API customerlist call fails C# RRS feed

  • Question

  • I used the example metioned here:

    http://msdn.microsoft.com/en-US/library/adcenter-customer-management-getting-list-customers.aspx

    string m_username = "XXX";
    string m_password = "XXX";
    string m_token = "XXX";

    CustomerManagementServiceClient service = null;

    service = new CustomerManagementServiceClient("BasicHttpBinding_ICustomerManagementService");
    GetCustomersInfoRequest request = new GetCustomersInfoRequest();
    GetCustomersInfoResponse response = null;
    request.UserName = m_username;
    request.Password = m_password;
    request.DeveloperToken = m_token;
    request.ApplicationScope = ApplicationType.Advertiser;
    request.CustomerNameFilter = null;
    request.TopN = 20;
    response = service.GetCustomersInfo(request);

    However, it seems that there is overwrite for  service.GetCustomersInfo(request); for 1 parameter. I would appreciate if someone can help.

    Sunday, February 3, 2013 11:08 AM

Answers

  • Hi,

    Thank you for your patience. After reviewing your code snippet, looks like the request.CustomerNameFilter is set to NULL. From the MSDN documentation  msdn.microsoft.com/.../adcenter-customer-management-getcustomersinforequest.aspx if you do not wish to filter by customer name, set it to an empty string "".

    A partial or full name of the customers that you want to get. The operation includes the customer in the result if the customer’s name begins with the specified filter name. If you do not want to filter by customer name, set this element to an empty string. The operation performs a case-insensitive comparison when it compares your name filter value to the customer names. For example, if you specify “t” as the name filter, the list will include customers whose names begin with “t” or “T”.

    Hope this helps! :-)

    Thursday, February 7, 2013 12:25 PM

All replies

  • Hello

    The request.CustomerNameFilter cannot be null. Instead set it to an empty string ("") if you do not want to filter the names.

    Thanks

    Tuesday, February 5, 2013 9:09 AM
  • Hi,

    Thank you for your patience. After reviewing your code snippet, looks like the request.CustomerNameFilter is set to NULL. From the MSDN documentation  msdn.microsoft.com/.../adcenter-customer-management-getcustomersinforequest.aspx if you do not wish to filter by customer name, set it to an empty string "".

    A partial or full name of the customers that you want to get. The operation includes the customer in the result if the customer’s name begins with the specified filter name. If you do not want to filter by customer name, set this element to an empty string. The operation performs a case-insensitive comparison when it compares your name filter value to the customer names. For example, if you specify “t” as the name filter, the list will include customers whose names begin with “t” or “T”.

    Hope this helps! :-)

    Thursday, February 7, 2013 12:25 PM