Author |
Message |
phamduoc Brekeke Member
Joined: 16 Dec 2014 Posts: 11
|
Posted: Tue Dec 16, 2014 8:56 pm Post subject: Pal websocket: You are not authorized to perform this operat |
|
|
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 |
|
llucy Brekeke Talented
Joined: 31 Jan 2014 Posts: 52
|
Posted: Tue Dec 16, 2014 11:58 pm Post subject: |
|
|
What was the JSON like for login?
Lucy |
|
Back to top |
|
phamduoc Brekeke Member
Joined: 16 Dec 2014 Posts: 11
|
Posted: Wed Dec 17, 2014 2:01 am Post subject: |
|
|
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 |
|
llucy Brekeke Talented
Joined: 31 Jan 2014 Posts: 52
|
Posted: Thu Dec 18, 2014 3:07 pm Post subject: |
|
|
Can you show me the response to it as well?
What was the WebSocket URL?
Lucy |
|
Back to top |
|
phamduoc Brekeke Member
Joined: 16 Dec 2014 Posts: 11
|
Posted: Thu Dec 18, 2014 9:00 pm Post subject: |
|
|
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 |
|
llucy Brekeke Talented
Joined: 31 Jan 2014 Posts: 52
|
Posted: Sat Dec 20, 2014 10:32 pm Post subject: |
|
|
>>"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 |
|
phamduoc Brekeke Member
Joined: 16 Dec 2014 Posts: 11
|
Posted: Sun Dec 21, 2014 8:07 pm Post subject: |
|
|
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 |
|
|