I'm working on an app that adds entries to a google sheet. Authorization is already working and I can create a sheet, but don't know how to set title due to difficult/lacking REST API documentation, only library code is shown.
I'm using: PHP7, cURL and the direct REST API endpoints, not the library.
To create a new spreadsheet, I call: https://sheets.googleapis.com/v4/spreadsheets with the access_token (bearer)
That works, but I would like to set the title in that same request or in the next request.
I tried: https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEETID:batchUpdate
$post_date = [
'requests' => [
'title' => 'Test '.$params['id'].' '.date('Y-m-d H:i:s').''
]
];
But it says invalid json payload. Also, I think it would be more efficient if I could set the title in the first request.