/Google-SheetAPI4--PHP-

Usage of Google Sheet API 4 using Service accounts

Primary LanguagePHP

Sample php code to update a google spreadsheet using Sheets API v4 and authentication mechanism being OAuth 2.0 for Server to Server Applications

To know more about OAuth 2.0 for Server to Server Applications , check out the below URL https://developers.google.com/api-client-library/php/auth/service-accounts

To know how to create a Service account, have a look at the below URL https://developers.google.com/identity/protocols/OAuth2ServiceAccount

  • Note down the service account email id and the other necessary details while creating the service account

Once the service account is create , enable the Sheet API in the developer console

Using Google's Sheet API v4

Google has provided us with an example on how to read the data from Google spreadsheet using their new v4 API which you can find it the below link https://developers.google.com/sheets/quickstart/php

Also to understand the API better do check out the API explorer https://developers.google.com/apis-explorer/#p/

Do share the spreadsheet the service account email address