diff --git a/GUIDE_API_KEY.md b/GUIDE_API_KEY.md index 688b6c1..4af8308 100644 --- a/GUIDE_API_KEY.md +++ b/GUIDE_API_KEY.md @@ -21,17 +21,9 @@ This guide explains how to create and configure API keys for use with the Google - API restrictions: select **Google Sheets API** only. - Do not leave keys unrestricted in production. -## Example `config.json` snippet +## Configure the project -To configure one key: - -```json -{ - "apiKeys": [ - "YOUR_API_KEY_1" - ] -} -``` +In `config.json`, add the keys under the `apiKeys` array. Here's an example using apiKeys: To configure multiple keys with per-key rate limits: diff --git a/readme.md b/readme.md index e186540..984cde8 100644 --- a/readme.md +++ b/readme.md @@ -36,20 +36,24 @@ Here is an example `config.json` matching the repository's `config.example.json` { "key": "YOUR_API_KEY_2", "rateLimitPerMinute": 50 } ], "serviceAccounts": [ - { "path": "credentials.json", "rateLimitPerMinute": 50 } + { "path": "credentials.json", "rateLimitPerMinute": 50 }, + { "path": "credentials_2.json", "rateLimitPerMinute": 50 } ], "documents": [ { "documentId": "YOUR_SPREADSHEET_ID", "outputDir": "output/your-document", "sheets": [ - { "name": "Sheet1", "outputFilename": "sheet1.csv" } + { "name": "Sheet1", "outputFilename": "sheet1.csv" }, + { "name": "Sheet2", "outputFilename": "sheet2.csv" } ] } ] } ``` +Your `config.json` should ONLY contain `apiKeys` OR `serviceAccounts`. + ## Rate limiting The app enforces a maximum of `rateLimitPerMinute` requests per minute to avoid exceeding API limits.