loadConfig(); $ipServer = $config['ipserver'] ?? 'localhost'; $apiUrl = "https://$ipServer/crm/api/v1.0/"; $token = $config['apitoken'] ?? ''; $client = new Client([ 'base_uri' => $apiUrl, 'verify' => false, ]); $ucrmApi = new UcrmApi($client, $token); try { echo "Fecthing custom attributes from $apiUrl\n"; $attributes = $ucrmApi->get('custom-attributes', ['attributeType' => 'client']); echo "Total attributes: " . count($attributes) . "\n"; foreach ($attributes as $attr) { echo sprintf("ID: %s | Name: %s | Key: %s\n", $attr['id'], $attr['name'], $attr['key']); } } catch (\Exception $e) { echo "Error: " . $e->getMessage() . "\n"; }