PHP code example of metatavu / metaform-api-client-php
1. Go to this page and download the library: Download metatavu/metaform-api-client-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/ */
metatavu / metaform-api-client-php example snippets
onfigure API key authorization: bearer
Metatavu\Metaform\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Metatavu\Metaform\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$api_instance = new Metatavu\Metaform\Api\AttachmentsApi();
$realmId = "realmId_example"; // string | realm id
$attachmentId = "attachmentId_example"; // string | Attachment id
try {
$result = $api_instance->findAttachment($realmId, $attachmentId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentsApi->findAttachment: ', $e->getMessage(), PHP_EOL;
}