We are trying to get the Content Delivery API working on an existing project (Episerver 22.214.171.124).
The default API is working, but we also want to use the OAuth possibility.
Therefore we need to add some lines to Startup.cs file.But this file is missing in our project.
It's a project from one or two years ago.So, what do we have to do? Create custom Startup.cs file? If so, with which code exactly?What dow we have to do with the appSetting "owin:AutomaticAppStartup" value (should it be false or true)?
When we set the appSetting to true and add the following lines to our newly added Startup.cs file:
app.UseContentApiIdentityOAuthAuthorization<ApplicationUserManager<ApplicationUser>, ApplicationUser>(new ContentApiOAuthOptions()
RequireSsl = false,
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(41),
RefreshTokenExpireTimeSpan = TimeSpan.FromDays(14)
we got the following error when calling /api/episerver/v2.0/site/:
Hopefully someone can help us with this problem!
Thanks in advance.
Sander, Have you read this documentation? https://world.episerver.com/documentation/developer-guides/content-delivery-api/authorization-service/