I am using UmbracoApiController with authentication, so as written in the documentation I made my controller to inherit from UmbracoAuthorziedApiControlller. here is my code:
public class CreationController : UmbracoAuthorizedApiController
{
[HttpGet]
public IActionResult Check()
{
return Ok("check success");
}
}
For full functionality of Umbraco CMS it is necessary to enable JavaScript.
my browser is enabling script, besides, I don't do this from browser but from postman.
I tried to inherit from UmbracoApiController and add authroized attribute just like the samples in the documentation, and when I do that - I get 401 but I don't find a way to post my credetials in order the pass the authentication and get response.
Can you help me please with those two cases? (or at least one of them)
The text 'For full functionality of Umbraco CMS it is necessary to enable JavaScript.' is the text from the login screen of Umbraco when it's loaded without Javascript. So I guess the response is the actual login screen of Umbraco in that case.
The UmbracoAuthorizedApiControllers are meant to be used by backoffice users in Umbraco. I use them mainly for endpoints that work with Umbraco backoffice plugins. I'm not sure how easy it is to log into Umbraco from Postman...
UmbracoAuthorizedApiController return response 'enable script`
I am using
UmbracoApiController
with authentication, so as written in the documentation I made my controller to inherit fromUmbracoAuthorziedApiControlller
. here is my code:when I call the api from postman with this url:
https://localhost:44354/Umbraco/backoffice/api/Creation/Check
I get 200 response with the following text:my browser is enabling script, besides, I don't do this from browser but from postman. I tried to inherit from
UmbracoApiController
and add authroized attribute just like the samples in the documentation, and when I do that - I get 401 but I don't find a way to post my credetials in order the pass the authentication and get response.Can you help me please with those two cases? (or at least one of them)
The text 'For full functionality of Umbraco CMS it is necessary to enable JavaScript.' is the text from the login screen of Umbraco when it's loaded without Javascript. So I guess the response is the actual login screen of Umbraco in that case.
The UmbracoAuthorizedApiControllers are meant to be used by backoffice users in Umbraco. I use them mainly for endpoints that work with Umbraco backoffice plugins. I'm not sure how easy it is to log into Umbraco from Postman...
is working on a reply...