Brekeke Forum Index » Brekeke PBX Forum

Post new topic   Reply to topic
Pal websocket: You are not authorized to perform this operat
Author Message
phamduoc
Brekeke Member


Joined: 16 Dec 2014
Posts: 11

PostPosted: Tue Dec 16, 2014 8:56 pm    Post subject: Pal websocket: You are not authorized to perform this operat Reply with quote

1. Brekeke Product Name and Version:
3.3.8.1
2. Java version:
1.7(64bit)
3. OS type and the version:
win8
4. UA (phone), gateway or other hardware/software involved:

5. Your problem:
After I login through the login() method with the sa user, I call method getRouteTemplateNames:

var m = {"jsonrpc": "2.0", "method": "getRouteTemplateNames", "params": {"tenant":""} , "id": id};
var mesg = JSON.stringify( m );
id++;
socket.send(mesg);

I received the following message:

"You are not authorized to perform this operation."

I also execute this method using web service, It's executed successfully. In the developer's guide, the required permission is sa. Please tell me the solution to fix this problem.

Thanks,
Back to top
View user's profile
llucy
Brekeke Talented


Joined: 31 Jan 2014
Posts: 52

PostPosted: Tue Dec 16, 2014 11:58 pm    Post subject: Reply with quote

What was the JSON like for login?

Lucy
Back to top
View user's profile
phamduoc
Brekeke Member


Joined: 16 Dec 2014
Posts: 11

PostPosted: Wed Dec 17, 2014 2:01 am    Post subject: Reply with quote

llucy wrote:
What was the JSON like for login?

Lucy


Thank Lucy,
I base on sample on website:
http://www.brekeke.com/downloads/pbx-developer-tool.php#websocket

JSON:

var m = {"jsonrpc": "2.0", "method": "login", "params": {"login_password": login_str_cryp} , "id":id};
var mesg = JSON.stringify( m );
id++;
socket.send(mesg);
Back to top
View user's profile
llucy
Brekeke Talented


Joined: 31 Jan 2014
Posts: 52

PostPosted: Thu Dec 18, 2014 3:07 pm    Post subject: Reply with quote

Can you show me the response to it as well?
What was the WebSocket URL?

Lucy
Back to top
View user's profile
phamduoc
Brekeke Member


Joined: 16 Dec 2014
Posts: 11

PostPosted: Thu Dec 18, 2014 9:00 pm    Post subject: Reply with quote

llucy wrote:
Can you show me the response to it as well?
What was the WebSocket URL?

Lucy


Thanks Lucy,

Can you show me the response to it as well?
"{"jsonrpc": "2.0", "error": {"code": -2000, "message": "You are not authorized to perform this operation."}, "id": "3"}"

What was the WebSocket URL?
"ws://172.18.23.89:18080/pbx/ws?tenant=-&login_user=sa&user=sa"
Back to top
View user's profile
llucy
Brekeke Talented


Joined: 31 Jan 2014
Posts: 52

PostPosted: Sat Dec 20, 2014 10:32 pm    Post subject: Reply with quote

>>"ws://172.18.23.89:18080/pbx/ws?tenant=-&login_user=sa&user=sa"

Please try with "ws://172.18.23.89:18080/pbx/ws?login_user=sa".
If you set tenant, it will act as an adin for the tenant level.

Lucy
Back to top
View user's profile
phamduoc
Brekeke Member


Joined: 16 Dec 2014
Posts: 11

PostPosted: Sun Dec 21, 2014 8:07 pm    Post subject: Reply with quote

llucy wrote:
>>"ws://172.18.23.89:18080/pbx/ws?tenant=-&login_user=sa&user=sa"

Please try with "ws://172.18.23.89:18080/pbx/ws?login_user=sa".
If you set tenant, it will act as an adin for the tenant level.

Lucy


Thanks Lucy,

It's done for me.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke PBX Forum All times are GMT - 7 Hours
Page 1 of 1