1. Go to this page and download the library: Download keestash/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$keestashClient = new \Keestash\Sdk\Client\KeestashClient(
new GuzzleHttp\Client(),
new ApiCredentialsProvider()
);
$login = new \Keestash\Sdk\Login\Login($keestashClient);
$data = $login->login(<username>, <password>);
var_dump($data);
// create credential
$c = new \Keestash\Sdk\PasswordManager\Entity\Credential(
'test-password',
'theusername',
'topsecret',
'root',
'https://keestash.com'
);
$credential = new \Keestash\Sdk\PasswordManager\Credential\Credential($keestashClient);
$credential->create($c);
// create folder
$folder = new \Keestash\Sdk\PasswordManager\Folder\Folder($keestashClient);
$folder->create(new \Keestash\Sdk\PasswordManager\Entity\Folder('test-folder', 'root'));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.