<h1>Google Sheets API Connection Test</h1><p><em>Using Service Account Authentication</em></p><h2>1. Configuration Check</h2>Spreadsheet ID: ✓ Defined<br>Credentials Path: ✓ Defined<br>Credentials File: <span style="color:green">✓ Found</span><br><h2>2. PHP Extensions Check</h2>OpenSSL: <span style="color:green">✓ Loaded</span><br>cURL: <span style="color:green">✓ Loaded</span><br><h2>3. Testing Service Account Authentication</h2><p style='color:green'>✓ Authentication successful! Access token obtained.</p><h2>4. Testing Google Sheets Connection</h2>Getting spreadsheet info...<br><p style='color:green'>✓ Connection successful!</p><strong>Spreadsheet Title:</strong> Finance Dashboard Database<br><strong>Service Account Email:</strong> finance-api@elite-caster-487006-f8.iam.gserviceaccount.com<br><p style='color:orange'>⚠ Make sure your spreadsheet is shared with this email!</p><h3>Available Sheets:</h3><ul><li>Settings</li><li>Master Akun</li><li>Pemasukan</li><li>Pengeluaran</li><li>Jurnal Umum</li><li>Akses</li></ul><h2>5. Testing Read Operation</h2>Reading 'Settings' sheet...<br><p style='color:green'>✓ Read successful!</p><strong>Data retrieved:</strong><br><pre>Array
(
    [0] => Array
        (
            [0] => periode_mulai
            [1] => periode_selesai
            [2] => nama_perusahaan
            [3] => alamat
        )

    [1] => Array
        (
            [0] => 2024-01-01
            [1] => 2024-12-31
            [2] => PT Maju Jaya
            [3] => Jakarta
        )

)
</pre><h2>6. Test All API Endpoints</h2><ul><li><a href='http://www.finance.sugaacademy.com//api/dashboard.php' target='_blank'>Dashboard</a> - <code>http://www.finance.sugaacademy.com//api/dashboard.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/settings.php' target='_blank'>Settings</a> - <code>http://www.finance.sugaacademy.com//api/settings.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/master-accounts.php' target='_blank'>Master Accounts</a> - <code>http://www.finance.sugaacademy.com//api/master-accounts.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/income.php' target='_blank'>Income</a> - <code>http://www.finance.sugaacademy.com//api/income.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/expenses.php' target='_blank'>Expenses</a> - <code>http://www.finance.sugaacademy.com//api/expenses.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/journal.php' target='_blank'>Journal</a> - <code>http://www.finance.sugaacademy.com//api/journal.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/ledger.php' target='_blank'>Ledger</a> - <code>http://www.finance.sugaacademy.com//api/ledger.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/trial-balance.php' target='_blank'>Trial Balance</a> - <code>http://www.finance.sugaacademy.com//api/trial-balance.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/income-statement.php' target='_blank'>Income Statement</a> - <code>http://www.finance.sugaacademy.com//api/income-statement.php</code></li><li><a href='http://www.finance.sugaacademy.com//api/balance-sheet.php' target='_blank'>Balance Sheet</a> - <code>http://www.finance.sugaacademy.com//api/balance-sheet.php</code></li></ul><h2 style='color:green'>✓ All tests passed!</h2><p>Your PHP backend is ready to use with Service Account authentication.</p><p>You can now connect it to your React frontend.</p>