$_SESSION['baseUrl'] ?? '', 'apiKey' => $_SESSION['apiKey'] ?? '', 'timeout' => 120, // Increase timeout to 2 minutes 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json' ] ]; // Try to use the new collection first, fallback to old one $collectionPath = __DIR__ . '/Content Scaling Flow.postman_collection_Oliver(New).json'; if (!file_exists($collectionPath)) { $collectionPath = __DIR__ . '/Content Scaling Flow_Oliver.Postman_Collection.json'; } $testRunner = null; $error = null; $result = null; try { if (file_exists($collectionPath)) { $testRunner = new TestRunner($collectionPath, $config); } else { $error = "Postman collection file not found"; } } catch (Exception $e) { $error = "Error initializing test runner: " . $e->getMessage(); } // Handle form submission if ($_POST && $testRunner) { if ($_POST['action'] === 'update_config') { $_SESSION['baseUrl'] = $_POST['baseUrl'] ?? ''; $_SESSION['apiKey'] = $_POST['apiKey'] ?? ''; $config['baseUrl'] = $_SESSION['baseUrl']; $config['apiKey'] = $_SESSION['apiKey']; $testRunner->updateConfig($config); $message = "Configuration updated successfully"; } if ($_POST['action'] === 'run_campaign_test') { $requests = $testRunner->getAvailableRequests(); // Find the exact "Retrieve Localized Campaign Folders" request foreach ($requests as $index => $request) { if (strpos($request['name'], 'Retrieve Localized Campaign Folders') !== false) { $result = $testRunner->runSingleTest($request, $index); break; } } if (!$result) { $error = "Could not find 'Retrieve Localized Campaign Folders' request"; } } } $oauth2Status = $testRunner ? $testRunner->getOAuth2Status() : null; $credentials = $testRunner ? $testRunner->getCredentials() : []; ?>
Testing the exact "Retrieve Localized Campaign Folders" request from Postman
✅ OAuth2 Token Active
Expires: = htmlspecialchars($oauth2Status['expires_at'] ?? 'Unknown') ?>
❌ OAuth2 Token Issue
Error: = htmlspecialchars($oauth2Status['error']) ?>
Client ID: = htmlspecialchars($credentials['client_id'] ?? 'Not found') ?>
Client Secret: = !empty($credentials['client_secret']) ? str_repeat('*', 20) : 'Not found' ?>
This will run the exact "Retrieve Localized Campaign Folders" request from your Postman collection
Name: = htmlspecialchars($result['name']) ?>
URL: = htmlspecialchars($result['response']['url'] ?? 'N/A') ?>
Method: = htmlspecialchars($result['response']['method'] ?? 'N/A') ?>
Status: = $result['status'] ?>
HTTP Code: = $result['response']['http_code'] ?? 'N/A' ?>
Response Time: = $result['response']['response_time'] ?? 0 ?>ms
Error: = htmlspecialchars($result['response']['error'] ?? 'Unknown error') ?>
No response body received.
"; } ?>