Hi. Let me explain what I want to do.
I have an AngularJS application.
I want to make API calls to Umbraco back-office to get content from it.
For example I want to get a content by its ID and show it in the AngularJS application.
How can I do this?
I know there is a Rest API developed by Umbraco but for using it I have to authenticate with a back-office user.
I need to access the back-office without logging in because all I want is to get some content.
What should I do?
Thanks.
AngularJS with Umbraco
Hi. Let me explain what I want to do. I have an AngularJS application. I want to make API calls to Umbraco back-office to get content from it. For example I want to get a content by its ID and show it in the AngularJS application. How can I do this? I know there is a Rest API developed by Umbraco but for using it I have to authenticate with a back-office user. I need to access the back-office without logging in because all I want is to get some content. What should I do? Thanks.
Hi,
I think you might need to write your own UmbracoApiController. then you can controll what you want back based on the call.
you can then control what come back - you could add some checks, just to make sure only the content nodes you allow come back.
When you have a controller - you can then call it from angular to get the content object / data you need.
Thanks Kevin.
Hi Kevin
How can we pass an authentication from Angular to our own UmbracoApiController?
Can you please provide some example?
Thanks
Did you ever find a solution?
Hi,
maybe this can help
https://creativewebspecialist.co.uk/2015/01/06/securing-umbraco-web-apis-using-json-web-tokens/
https://github.com/warrenbuckley/Umbraco-JWT-AuthTokens
https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/84623-securing-a-rest-api-using-jwt-and-umbraco-front-end-members
https://24days.in/umbraco-cms/2015/umbraco-rest-api/
is working on a reply...