ContentDeliveryAPI Getting Started

Installation:
1. Install EPiServer.ContentDeliveryApi via nuget
2. Enable token authorization
public class Startup
{
  public void Configuration(IAppBuilder app)
  {
    app.UseContentApiIdentityOAuthAuthorization<ApplicationUserManager<SiteUser>,SiteUser>(
      new ContentApiOAuthOptions()
      {
        RequireSsl = false,
      }
    );
  }
}
3. If you get the error "System.ArgumentException: A route named 'MS_attributerouteWebApi' is already in the route collection. Route names must be unique."
<add key="episerver:contentdeliverysearch:maphttpattributeroutes" value="false"/> <add key="episerver:contentdelivery:maphttpattributeroutes" value="false"/>

Testing using Postman:
- Get token
- Get Content

API document:

Comments

Popular posts from this blog

Optimizely Content Graph: minimal setup for testing

Episerver ServiceAPI: Example of how-to properly call the media upload

SameSite Cookie login troubleshooting