0

I'm using apache api open meetings. It has been working in login, but when i try to add a new user, I get HTTP Response Error 500 (insufficient permissions).

I tried this, but it doesn't work:

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<script>

 function create_user() {

             $.ajax({
              method: "POST",
              url: "http://localhost:5080/openmeetings/services/user",

              data: {sid : "2575fb6f-c030-4ef4-b9c5-0c6bcb9b18f3",
                    userDTO:JSON.stringify( { address :{
                            additionalname:"mr"
                            ,comment:"k"
                            ,country:"sy"
                            ,deleted:false
                            ,email:"ssss@hotmail.com"
                            ,fax:"111"
                            ,id:222
                            ,inserted:"2014-02-14T08:00Z"
                            ,phone:"1111"
                            ,street:"sss"
                            ,town:"sss"
                            ,updated:"2014-02-14T08:00Z"
                            ,zip:"qq"
                                }
                        ,externalId:"1"
                        ,externalType:"myCMS"
                        ,firstname:"asasas"
                        ,id:1
                        ,languageId:55
                        ,lastname:"zxczxc"
                        ,login:"asasas"
                        ,password:"asasas"
                        ,rights:null
                        ,timeZoneId:"sa"
                        ,type:{type:"user"}     
                        }),
                    confirm: false },

              dataType: "json",
              success: function(data){                      
                $("#res").html(data["id"]);     
              }
            });                             
 }

$(document).ready(function(){
    $("button").click(function(){
        create_user();
    });
});
</script>
</head>
<body>
<button>Get JSON data</button>
<div id="res"></div>
</body>
</html>
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Omar Bahri
  • 11
  • 3

1 Answers1

-1

You should pass the SID as part of the URL itself. That will fix the permissions issue.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574