Bulk Upload Remarketing list issue 500 Internal Server Error

Simran 1 Reputation point
2022-09-05T13:29:58.787+00:00

Hi Team,

I am trying to implement a workflow for Bulk upload of remarketing list into Bing Ads using the documentation provided here: https://learn.microsoft.com/en-us/advertising/guides/bulk-download-upload?view=bingads-13#uploading. So far I have been able to:

  1. Register my application
  2. Request user consent
  3. Get access and refresh tokens

The next step in this workflow is to get the URL for bulk upload of a .csv file by calling the getBulkUpload URL endpoint and once a URL is retrieved to upload the file and confirm that the upload happened successfully. Unfortunately I am getting a 500 internal server error when trying to end request to this endpoint. I am using Postman to construct the request and below I have shared the endpoint I am posting the request to:

https://bulk.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
452 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hasmer Salubre 5 Reputation points
    2025-03-06T21:00:10.9566667+00:00

    I have the same issue.

    I am currently uploading the csv with the contents below

    Type,Status,Id,Parent Id,Client Id,Modified Time,Name,Description,Scope,Audience,Action Type

    Format Version,,,,,,6.0,,,,,,

    Customer List,Active,-1,,af32d10b-7e30-b9e3-3384-3a187e3a3d40,2025-03-07 11:22:52,New Dealerverse Name,New Customer List Dealerverse Description,Customer,New Customer List,Add

    I have received the uploade url from IBulkService and used it to upload. please check my code below:

    var bulkService = new ServiceClient

    var request = new GetBulkUploadUrlRequest()

    {

    AccountId = long.Parse(customerId),

    ResponseMode = ResponseMode.ErrorsAndResults,

    };

    var response = await bulkService.CallAsync((s, r) => s.GetBulkUploadUrlAsync(r), request);

    string uploadUrl = response.UploadUrl;

    using (var httpClient = new HttpClient())

    {

    using (var fileStream = new FileStream(csvFilePath, FileMode.Open, FileAccess.Read))

    using (var content = new StreamContent(fileStream))

    {

    content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain");

    HttpResponseMessage uploadResponse = await httpClient.PostAsync(response.UploadUrl, content);

    if (uploadResponse.IsSuccessStatusCode)

    {

    Console.WriteLine("Bulk file uploaded successfully.");

    }

    else

    {

    Console.WriteLine($"Upload failed. Status Code: {uploadResponse.StatusCode}");

    string errorDetails = await uploadResponse.Content.ReadAsStringAsync();

    Console.WriteLine($"Error Details: {errorDetails}");

    return false;

    }

    }

    }

    The problem is in this line
    HttpResponseMessage uploadResponse = await httpClient.PostAsync(response.UploadUrl, content);

    The response is IsSuccessStatusCode = false

    And when I look at the response error details it shows Internal Server Error.

    Please help.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.