Connection to read, write and update Google Sheets.
Code: PHP
- Composer https://getcomposer.org/
- Account and Credentials for Google Sheets API on https://console.cloud.google.com/
- Install
composer require 'google/apiclient'
- Copy json key of service account in credentials.json
- Update your parameters in config.php
- Remember to share your Google sheet with service account's email
Method GET
You can specify a range on query ?range=A3:B5
.
Method POST
Specify operation type on body.
Need range on body range=A3:B5
.