Authentication Modes
API Key Mode
Standard Google Sheets API v4 integration using GCP API Keys.
API Key mode uses official Google Sheets API v4 endpoints for public spreadsheets with custom GCP API quota monitoring.
Setup
- Create an API Key in Google Cloud Console.
- Add credentials to
.env:
.env
GSHEET_SPREADSHEET_ID=your-spreadsheet-id
GSHEET_API_KEY=AIzaSy...
Example
pages/inventory.vue
<script setup lang="ts">
const { data: stock } = await useGSheetAsObject('A1:C20', {
sheet: 'Inventory'
})
</script>