1. Go to this page and download the library: Download vaultic/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.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vaultic / sdk example snippets
aultic\VaulticClient;
// Initialize the client with your API key
$client = new VaulticClient('vt_your_api_key_here');
// Get a prompt with variables
$prompt = $client->prompts->get('0sZNC8EC9D', [
'variables' => [
'user_name' => 'John',
'issue' => 'Password reset'
]
]);
echo $prompt['system_content'];
echo $prompt['user_content'];
// Get a prompt by ID
$prompt = $client->prompts->get('prompt_id_here');
// Get a prompt with variables replaced
$prompt = $client->prompts->get('prompt_id_here', [
'variables' => [
'name' => 'John Doe',
'email' => '[email protected]'
]
]);