0

I tried to access the ItemService RESTful API from a localhost with an sc_apikey but it turns out the RESTful API was not reading my sc_apikey, but it's just acting on my configuration name="Sitecore.Services.AllowAnonymousUser" value="true" so that's the reason why I can retrieve an item but was not able to edit an item because the Anonymous user is impersonated as sitecore\ServiceAPI.

So my question is, am I missing some parts of the config where the ItemService reads my sc_apikey?

Here are the changes I've made so far to the config, I have also created an API Key item:

<setting name="Sitecore.Services.SecurityPolicy"
    value="Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy, Sitecore.Services.Infrastructure" />
<name="Sitecore.Services.AllowAnonymousUser" value="true"/>
<allowedOrigins hint="list:AddOrigin">
    <origin>http://localhost:4200</origin>
</allowedOrigins>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.