PCextreme / cloudstack-php

Native PHP Cloudstack client
MIT License
10 stars 9 forks source link

unable to verify user credentials and/or request signature in /root/vendor/pcextreme/cloudstack/src/Client.php:413 #31

Open dragan1979 opened 4 years ago

dragan1979 commented 4 years ago
<?php

include(__DIR__.'/vendor/autoload.php');

use PCextreme\Cloudstack\Client;

$client = new Client([
    'urlApi'    => 'http://localhost:8080/client/api?',
    'apiKey'    => 'Z-dr9dp6gZbKmrl9stAm6uGBSWqSonMhc2i-nqVlSG6MlpvqWFWW1uVJEZnrrwq_drQXDWRFTGwZ1p_qarLzwQ',
    'secretKey' => 'p_iiuI3oDxBCxmUgceAHYf-f9uotX9B-uK2qxmVAT_bbYfPdhiePnlPRjbL6CvtPH8gDbjIh8uGPmP1KjN6HBQ',
]);

var_dump($client->listAccounts(['name' => 'admin', 'listall' => 'true']));

getting:

PHP Fatal error:  Uncaught PCextreme\Cloudstack\Exception\ClientException: unable to verify user credentials and/or request signature in /root/vendor/pcextreme/cloudstack/src/Client.php:413
Stack trace:
#0 /root/vendor/pcextreme/cloudstack/src/AbstractClient.php(136): PCextreme\Cloudstack\Client->checkResponse(Object(GuzzleHttp\Psr7\Response), Array)
#1 /root/vendor/pcextreme/cloudstack/src/Client.php(158): PCextreme\Cloudstack\AbstractClient->getResponse(Object(GuzzleHttp\Psr7\Request))
#2 [internal function]: PCextreme\Cloudstack\Client->command('listAccounts', Array)
#3 /root/vendor/pcextreme/cloudstack/src/Client.php(450): call_user_func_array(Array, Array)
#4 /root/1.php(13): PCextreme\Cloudstack\Client->__call('listAccounts', Array)
#5 {main}
  thrown in /root/vendor/pcextreme/cloudstack/src/Client.php on line 413
FrontEndCoffee commented 4 years ago

We'll look in to this next week, thank you for reporting 👍