php-google-spreadsheet-client
php-google-spreadsheet-client copied to clipboard
getListFeed with filter
Hi there,
I am trying to use $listFeed = $worksheet->getListFeed(["id" => "1123456"]);
to filter my data to only retrieve what I need. But it returns
[Google\Spreadsheet\Exception\UnauthorizedException]
You need permission
I have no problems reading the whole document with $listFeed = $worksheet->getListFeed();
or updating the document with `$listFeed->insert(["id" => "123451"]);
The scopes I added:
$client->setScopes(['https://www.googleapis.com/auth/drive', 'https://docs.google.com/feeds']);
Am I missing a scope or something else?
Br,
Hi,
The array you are passing is not correct. Please have a look at the documentation:
https://github.com/asimlqt/php-google-spreadsheet-client#retrieving-a-list-feed
It needs to be something like the following:
$worksheet->getListFeed(["sq" => "id = 1123456"]);