• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

api-rpc error 1006 premissions denied

M

mike_vip

Guest
I'm sure, that my code is right. I really don't know what's wrong with it! :( I've tried it with acc of domain owner (videotube) and acc of videotube's client -> webbox.eu.. but no success (my domain is webbox.eu)

My code:

test.php
PHP:
<?php

 

* Reports error during API RPC request

class ApiRequestException extends Exception {}

 

* Returns DOM object representing request for information about all available domains

 

function mailInfoRequest()

{

      $xmldoc = new DomDocument('1.0', 'UTF-8');

      $xmldoc->formatOutput = true;

	  $xmldoc->loadXML('<packet version="1.4.1.2">

<domain>

<get>

      <filter/>

      <dataset>

             <limits/>

             <prefs/>

             <user/>

             <hosting/>

             <stat/>

             <gen_info/>

      </dataset>

</get>

</domain>

</packet>'); 

      return $xmldoc;

}
/**

* Prepares CURL to perform Plesk API request

* @return resource

*/

 

//

// int main()

//

$host = 'videotube.vshosting.cz';

$login = 'login_to_plesk';

$password = 'pass_to_plesk';

 

$curl = curlInit($host, $login, $password);

 

try {

 

      $response = sendRequest($curl, mailInfoRequest()->saveXML());

      $responseXml = parseResponse($response);

      checkResponse($responseXml);

 

} catch (ApiRequestException $e) {

      echo $e;

      die();

}

 

// Explore the result

foreach ($responseXml->xpath('/packet/domain/get/result') as $resultNode) {

      echo "Domain id: " . (string)$resultNode->id . " ";

      echo (string)$resultNode->data->gen_info->name . " (" . (string)$resultNode->data->gen_info->dns_ip_address . ")\n";

}

 

?>


I'm always getting this:
Code:
object(SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["version"]=> string(7) "1.4.1.2" } ["system"]=> object(SimpleXMLElement)#2 (3) { ["status"]=> string(5) "error" ["errcode"]=> string(4) "1006" ["errtext"]=> string(18) "Permission denied." } }

I'm going crazy...
thanks in advance
 
Back
Top