Bearer logo
Google Sheets API logo

Google Sheets API

v4

API documentation
https://developers.google.com/sheets/api/reference/rest/

Developer website
https://developers.google.com/sheets/

Incorrect or missing information? Help us

What is the Google Sheets API?

In 2006, Google introduced Google Sheets, a free to use, web-based, software spreadsheet. Now part of the G Suite and with a powerful API, developers have here an easy to use spreadsheet interface, to be used internally or to provide to customers.

How to use the Google Sheets API?

NodeJSRubyPythonPHP
// npm install @bearer/node
bearer
.integration('google_sheets')
.auth('AUTH_ID') // Check the code example below on how to generate access tokens
.put('REPLACE-WITH-SPREADSHEET-ID/values/B2', { query: { valueInputOption: "RAW"}, body: { values: [["Giant Panda"]]}})
.then(({ data }) => console.log(data))
.catch(e => console.log(e))
NodeJSRubyPythonPHP
// npm install @bearer/node
bearer
.integration('google_sheets')
.auth('AUTH_ID') // Check the code example below on how to generate access tokens
.post('REPLACE-WITH-SPREADSHEET-ID/values/A1:range', { query: { valueInputOption: "RAW"}, body: { values: [["Giant Panda"],["Polar Bear"],["Brown Bear"]]}})
.then(({ data }) => console.log(data))
.catch(e => console.log(e))
NodeJSRubyPythonPHP
// npm install @bearer/node
bearer
.integration('google_sheets')
.auth('AUTH_ID') // Check the code example below on how to generate access tokens
.get('1oB6jDTYUb8_UznDhhL5RQ083Z5zn4RacuUma22_8byQ/values/A2:D9')
.then(({ data }) => console.log(data))
.catch(e => console.log(e))
HTML/JSReact
<script src="https://cdn.jsdelivr.net/npm/@bearer/js/lib/bearer.production.min.js"></script>
<button class="btn btn-primary" onclick="myConnectButton()">
Connect to Google Sheets
</button>
<script>
const bearerClient = bearer('YOUR_BEARER_PUB_KEY')
function myConnectButton() {
bearerClient
.connect(
'google_sheets'
)
.then(({ authId }) => {
// Use this authId like bearer.auth(authId).get(..
console.log('AUTH_ID for this user', authId)
})
}
</script>

Start using the Google Sheets API

Bearer provides a universal API client to call any Google Sheets endpoints. It takes care of API authentication, credentials management, and monitoring out-of-the-box.

Available in Node.js, Ruby, Python, and PHP

Sign up with Email

How to get a Google Sheets API Key?

  1. Sign in to the Google Cloud console
  2. Select your Google's project (or create a new one)
  3. Search for the Google Sheets API and enable it
  4. On the main menu, select "APIs & Services" > "Credentials"
  5. Now create credentials with the "OAuth client ID" method
  6. If you don't have one, you'll have to configure an OAuth consent screen. Inside the OAuth consent screen configuration, make sure that bearer.sh is listed in the "Authorized domains"
  7. Now, back to create an OAuth client ID page, select "Web application"
  8. In the Authorized redirect URIs, paste the following URL https://int.bearer.sh/v2/auth/callback
  9. Click on "Create" and that's it!

Google Sheets API Rate Limits

The Google Sheets API has a limit of 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user. Limits for reads and writes are tracked separately. There is no daily usage limit.

Google Sheets API Versions

versionstatusrelease date
v4latest
The latest version of the Google Sheets API
June 1st, 2016
v3deprecated
That version is deprecated and Google recommends to move to v4.
v2unavailable
NA
v1unavailable
NA

Start integrating the Google Sheets API for free!

Universal API client

Query the Google Sheets API and hundreds more APIs using a single API client.

Identity Management

From API credentials to OAuth dance, token and refresh token, Bearer manages it all.

Real-time Monitoring

Get a complete overview of your API usage with metrics and in-depth logs, find errors anddebug in a snap.

Bearer - Integrations built in minutes, Monitored in real-time

Company

Docs & Help

Legal

Bearer is on TwitterBearer is on GitHubBearer is on FacebookBearer is on LinkedIn
© Copyright Bearer 2019
Bearer uses cookies to make its website easier to use. Learn more about cookies.