1. Go to this page and download the library: Download transip/transip-api-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/ */
transip / transip-api-php example snippets
use Transip\Api\Library\TransipAPI;
ebsite.
$login = '';
// If the generated token should only be usable by whitelisted IP addresses in your Controlpanel
$generateWhitelistOnlyTokens = true;
// One of your private keys; these can be requested via your Controlpanel
$privateKey = '';
$api = new TransipAPI(
$login,
$privateKey,
$generateWhitelistOnlyTokens
);
// Create a test connection to the api
$response = $api->test()->test();
if ($response === true) {
echo 'API connection successful!';
}