Management Rest Api 403 Forbiden

211 views
Skip to first unread message

Fatih Alpay

unread,
Oct 21, 2021, 4:28:37 AM10/21/21
to Ant Media Server
Hi we are running AntMedia in AWS 
we are trying to use management rest api services but we are getting 403 forbidden 
  • Enterprise Edition 2.4.0.2 20210905_1241
https://{my_domain_name}:5443/rest/v2/users-list

Cors filter as below 

 <filter>

                <filter-name>CorsFilter</filter-name>

                <filter-class>io.antmedia.filter.CorsHeaderFilter</filter-class>

                <init-param>

                  <param-name>cors.allowed.origins</param-name>

                  <param-value>*</param-value>

                </init-param>

                <init-param>

                  <param-name>cors.allowed.methods</param-name>

                  <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>

                </init-param>

                 <init-param>

                        <param-name>cors.allowed.headers</param-name>

            <param-value>Accept, Origin, X-Requested-With, Access-Control-Request-Headers, Content-Type, Access-Control-Request-Method, Authorization</param-value>

         </init-param>

        </filter>




Could you please let me know how to use management rest api over postman or any curl service to embed our application. 


Thanks

Fatih Alpay

unread,
Oct 21, 2021, 5:48:43 AM10/21/21
to Ant Media Server
Ok i think i found the solution. 
In order to use management services , first /v2/users/authenticate shoud be invoked. , than rest calls returns 200 Ok 

well it is not written in any documentation , if so please share the document address please. 

Yash Tandon

unread,
Oct 21, 2021, 3:06:09 PM10/21/21
to Ant Media Server
Hi Fatih,
Hope you are fine.
Yes, you have to authenticate the user and also you can disable the authentication filter but it is not the recommended way. You can check the answer of this question on stack overflow from one of my colleague.
We will update the REST guide document regarding management rest API.

Regards,
Yash
Reply all
Reply to author
Forward
0 new messages