Referring back to these links I tried using [RequiredApiKey] however it's never getting recognized as a class attribute on the controller:

enter image description here

enter image description here

1 Answer 1


The RequiredApiKey attribute is in a separate package and namespace Sitecore.Services.Infrastructure.Security. I can't see from your screenshot whether you've added a reference to Sitecore.Services.Infrastructure.Sitecore, and if you have this in your using declarations:

using Sitecore.Services.Infrastructure.Security;
  • Yes, Thank you so much for the help, you're quiet right however it required also to install Microsoft.AspNet.WebApi.Core Commented Jun 28, 2022 at 8:57
  • 1
    @MohamedAbbas I think you might have misread that, as far as I can see it requires Microsoft.AspNet.WebApi.Cors (CORS not Core).
    – Holger
    Commented Jul 10, 2023 at 13:12
  • I think you might be right I can't recall the case now, however I think you're correct Commented Jul 12, 2023 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.