Umbraco Rest Api - Authorization has been denied for this request
I've installed the UmbracoCms.RestApi package, Changed my Web.Config to look at the UmbracoStandardOwinStartup class.
I've also changed my UmbracoStandardOwinStartup class to this :
app.ConfigureUmbracoRestApi(new UmbracoRestApiOptions()
{
//Modify the CorsPolicy as required
CorsPolicy = new CorsPolicy()
{
AllowAnyHeader = true,
AllowAnyMethod = true,
AllowAnyOrigin = true
}
});
app.UseUmbracoBackOfficeTokenAuth();
I am using postman to get the token via umbraco/oauth/token - Which gives me back a bearer token.... so far so good.
I am next trying to do a GET on umbraco/rest/v1/content, I've added the Authorization header with my bearer token in the form of Bearer (then the token).
However for every request i am getting the "Authorization has been denied for this request." but i'm not sure why!? Can anyone point me in the right direction?
Umbraco Rest Api - Authorization has been denied for this request
I've installed the UmbracoCms.RestApi package, Changed my Web.Config to look at the UmbracoStandardOwinStartup class.
I've also changed my UmbracoStandardOwinStartup class to this :
I am using postman to get the token via umbraco/oauth/token - Which gives me back a bearer token.... so far so good.
I am next trying to do a GET on umbraco/rest/v1/content, I've added the Authorization header with my bearer token in the form of Bearer (then the token).
However for every request i am getting the "Authorization has been denied for this request." but i'm not sure why!? Can anyone point me in the right direction?
Hi Neil,
Have you find any solution for this.I am also facing same issue.
Thanks, Pavan
I have to change in UmbracoAuthTokenServerExtensions.cs file.
//TokenEndpointPath = new PathString("/umbraco/oauth/token"),
to
TokenEndpointPath = new PathString("/oauth/token"),
then it will work.
Thanks, Pavan
is working on a reply...