Sheets v4 API provides:
- Faster responses
- More features
- Uses JSON instead of XML
async
/await
support
See example (eg
) files in this repository for more information
Tips:
- The Node.js API mirrors the "REST Resources" found in the documentation https://developers.google.com/sheets/api/reference/rest/.
- Use a TypeScript enabled editor for useful auto-completes
The following process creates a new OAuth application (Client ID/Secret) and gives it access to your Google account's spreadsheets (Refresh token) and stores the results into credentials.json
- Get your credentials
- Go to https://console.cloud.google.com/apis/dashboard
- Click "Enable APIs and Services"
- Search "Sheets"
- Click "Enable"
- Go to https://console.developers.google.com/apis/credentials/oauthclient
- IMPORTANT Choose "Desktop app" and choose a name
- Should find a form with: Client ID, Client secret
- Run
node credentials-fill.js
which will updatecredentials.json
- Optional: Updated the
userdetails.json
file with your credentials and other user info.
- Run the examples (
eg-*.js
)