PHP code example of nerd-zero / infisical-php

1. Go to this page and download the library: Download nerd-zero/infisical-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nerd-zero / infisical-php example snippets


use Infisical\InfisicalClient;

$client = InfisicalClient::factory(
    baseUri: 'your-infisical-base-uri',
    clientId: 'your-infisical-client-id',
    clientSecret: 'your-infisical-client-secret',
);

// Get all secrets
$secrets = $client->listSecrets([
    'workspaceId' => 'your-workspace-id',
    'environment' => 'your-environment',
    'path' => 'your-path',
]);