---
title: Troubleshoot Content Delivery API Errors
slug: cms-12/api/troubleshooting
docTags: 
createdAt: 2026-08-07T16:45:43.000Z
---

## Common errors

### 404 - ContentNotFound when trying to get content with Content Delivery

- **Do you enable the MultiSiteFilteringEnabled option?**
  If enabled, the Optimizely Content Delivery API returns only the current site's contents based on the request's context.
- **Do you use the correct Accept-Language header?**
  Content Delivery API returns content based on the language passed in the Accept-Language header. Use the Accept-Language header to specify the locale variant of content that the client prefers (see [Mozilla - MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) for information).
  The problem is that some browsers, such as Chrome, automatically add their preferred language to the Accept-Language header if the user does not manually set the header value. In this case, the client should manually pass the Accept-Language header to prevent the browser from adding its header value.
  Using the Content Delivery API in an AJAX application, you can specify or override the Accept-Language header value in your front-end code. See this external [blog post](https://stefanolsen.com/posts/ensuring-the-right-ajax-content-language-using-a-filter-attribute/) for a code sample.

### 404 Http Error when sending a request to Content Delivery endpoints

- **Have you registered Content Delivery API services?**
  To enable Content Delivery API endpoints, you need to call this line in your `Startup` file:

```csharp
services.AddContentDeliveryApi()
```

### 404 Http Error when sending a request to token endpoints in EPiServer.OpenIDConnect

Make sure you have added the following lines at the bottom in `Startup.cs`. (see [Authenticate the API](docId\:GcwKCbUQUXLkDILm5DQmW).

```csharp
services.AddOpenIDConnect<ApplicationUser>(options => {
  var application = new OpenIDConnectApplication() {
    ClientId = "client",
      ClientSecret = "secret"
  };
  options.Applications.Add(application);
});
```

### I cannot get my images from my content

Use a property model converter (`IPropertyModelConverter`), which lets you customize the output sent to the Content Delivery API. See an example in the [Music Festival](https://github.com/episerver/musicfestival-vue-template/blob/master/src/MusicFestival.Vue.Template/Infrastructure/BuyTicketBlockPropertyModelConverter.cs) project. See also [Serialization](docId\:sdITUMRxuxBO9KF9stemS) and How to [customize data returned to clients](docId\:G0-aJ6fe4B2u8u7UHsx1L).
