$_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() : []; ?> Simple Campaign Folders Test

Simple Campaign Folders Test

Testing the exact "Retrieve Localized Campaign Folders" request from Postman

Error:

API Configuration

OAuth2 Status

✅ OAuth2 Token Active

Expires:

❌ OAuth2 Token Issue

Error:

Loaded Credentials

Client ID:

Client Secret:

Run Campaign Folders Test

This will run the exact "Retrieve Localized Campaign Folders" request from your Postman collection

Test Result

Request Details

Name:

URL:

Method:

Status:

HTTP Code:

Response Time: ms

Error:

Response Analysis

"; echo "⚠️ Partial Response Received
"; echo "The request timed out but we received " . strlen($responseBody) . " bytes of data."; echo "
"; // Try to fix incomplete JSON by adding closing brackets $fixedJson = $responseBody; $openBraces = substr_count($fixedJson, '{') - substr_count($fixedJson, '}'); $openBrackets = substr_count($fixedJson, '[') - substr_count($fixedJson, ']'); // Add missing closing brackets for ($i = 0; $i < $openBrackets; $i++) { $fixedJson .= ']'; } for ($i = 0; $i < $openBraces; $i++) { $fixedJson .= '}'; } echo CampaignFormatter::formatCampaignResponse($fixedJson); } else { echo CampaignFormatter::formatCampaignResponse($responseBody); } } else { echo "

No response body received.

"; } ?>
🔍 View Raw JSON Response (Technical Details)