XMLRPC Permission Errors

When trying to connect via xmlrpc I am getting the following:

PHP Notice:  xmlrpc: Error -118
A problem '{error,account_unprivileged}' occurred executing the command user_resources with arguments
[] (-118) in /home/john.tennyson/test.php on line 18

My ejabberd.yml file contains the following:

listen:
  -
    port: 4560
    module: ejabberd_xmlrpc
    maxsessions: 10
    timeout: 5000
    access_commands:
      xmlrpc_access:
        commands: all
        options: []
    options: []

acl:
  xmlrpc_access:
    user:
      - "admin": "chat.descendentstudios.com"

access:
  xmlrpc:
    xmlrpc_access: allow

commands_admin_access: xmlrpc_access

The PHP code I am using is:

<?php
$param
=array("user"=>"admin","server"=>"chat.descendentstudios.com","password"=>"redacted");
$request=xmlrpc_encode_request('user_resources', $param, (array('encoding' => 'utf-8')));

$context = stream_context_create(array('http' => array(
   
'method' => 'POST',
   
'header' => "User-Agent: XMLRPC::Client mod_xmlrpc\r\n" .
               
"Content-Type: text/xml\r\n" .
               
"Content-Length: " . strlen($request),
   
'content' => $request
)));

$file = file_get_contents("http://chat.descendentstudios.com:4560/RPC2", false, $context);

$response = xmlrpc_decode($file);

if (

xmlrpc_is_fault($response)) {
   
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
} else {
   
print_r($response);
}

?>

I can't seem to figure out what I am doing wrong. Can anyone give me pointers? I am running ejabberd 15.11

Thanks!

Now I feel foolish...

Now I feel foolish...

access:
  xmlrpc:
    xmlrpc_access: allow

Needed to be

access:
  xmlrpc_access:
    xmlrpc_access: allow

for obvious reasons.

Right, or

Right, or alternatively:

acl:
  xmlrpc_acl:
    user:
      - "admin": "chat.descendentstudios.com"

access:
  xmlrpc_access:
    xmlrpc_acl: allow

commands_admin_access: xmlrpc_access

I do same fconfiguration but

I do same fconfiguration but i got this error

"message": "User Notice: xmlrpc: Error -118\nA problem '{error,access_rules_unauthorized}' occurred executing the command register with arguments\n[{user,<<\"ok\">>},{host,<<\"localhost\">>},{password,<<\"ok\">>}] (-118)",

ejabberd 17.07

Thank you

Syndicate content