Hi,

That 401 error is telling you that you must be authenticated to use that 
REST API endpoint.  It's likely that either you are not authenticated, or 
you are not passing the *required* authentication information in the POST 
request.  You MUST pass the `Authorization` header to any endpoint that 
requires authentication.  Examples can be found in the REST Contract 
documentation for Authentication (see the "Status" examples on how to use 
the status endpoint with the "Authorization" 
header): https://github.com/DSpace/RestContract/blob/main/authentication.md

Since it looks like you are building custom code into the User Interface, 
you might want to look at how other places in the codebase structure the 
POST request and use a similar pattern.  You also could look at using 
Angular debugging tools to understand where your custom code might be 
breaking, e.g.  https://angular.io/guide/devtools

Good luck,
Tim
On Monday, October 30, 2023 at 6:30:10 AM UTC-5 geethanj...@gmail.com wrote:

> Hello,
>
> POST
> http://localhost:8080/server/api/authz/resourcepolicies?resource=4be27756-65fe-46d8-8524-8c0d83ad2a59&eperson=91cc8a11-e95d-40a7-8a28-dd055edba794
>  
>
>    - 
>    
> timestamp
> "2023-10-30T10:56:31.717+00:00"
> status
> 401
> error
> "Unauthorized"
> message
> "Authentication is required"
> path
> "/server/api/authz/resourcepolicies"
>
>
>
> i have add a community drop-down field in the new registration form now i  
> want to create an policy to the selected community for the eperson 
>
> and also i have changes code in frontend but its shows  the above error 
> how to resolve that
>
>
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/22678b34-8eff-4c49-84d4-acf1fa62e321n%40googlegroups.com.

Reply via email to