apache / openmeetings

Mirror of Apache Openmeetings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rest API not working, error.notallowed

andylin810 opened this issue · comments

Hi, I am using OpenMeetings 5.0.1, when I tried making GET request to test the REST API, the login request always goes through and get a success response back with the sid (GET https://xxx.xxx.xxx.x/openmeetings/services/user/login?user=xx&pass=xx) , but when I tried make other request such as generating hash or a simple 'get' for listing all users (GET https://xxx.xxx.xxx.x/openmeetings/services/user?sid=xxxxxxxxx) an HTTP 500 error is returned on the browser. Inside the OpenMeetings log, when the error happens, the log shows a bunch of notallowed errors like this:

CalendarWebService has thrown exception, unwinding now, interceptor.Fault: error.notallowed
....
caused by error.ServiceException: error.notallowed

I also tried the same thing with a previous working application that is using an older version of OpenMeetings(4.x.x), both requests work, and I receive responses for both requests.

My OpenMeetings server has a restrictive network which blocks all ports besides port 443.
Is there a place for setting up the REST API configurations that I should be checking?

Any help is appreciated, thanks.

Hello @andylin810,

this example https://openmeetings.apache.org/RestAPISample.html works for me as expected
(and this functionality is tested using unit tests in every build)

so I guess there might be some issue with usage
please check the user you are using in .../user/login?user=xx&pass=xx has SOAP privilege
secure hash generation is only allowed to SOAP admin

p.s. I would recommend to update to more recent version :)

Hi. @solomax , it turned out that is exactly the reason why it failed, I actually found out before I saw your comment by comparing the one working and not working and noticed the difference between the privilege tag but I never thought SOAP would be needed since it is a REST api instead of SOAP, thank you.

The role name was created while there was SOAP only :))