Answer the question
In order to leave comments, you need to log in
How to get the contents of a sheet/tab of a table on google docs?
I'm trying to get a table from google docs using this client https://github.com/google/google-api-php-client accessed the table like this:
$url = 'https://sheets.googleapis.com/v4/spreadsheets/' . $docId . '/?key=KEY';
$method = 'GET';
$headers = ["Authorization" => "Bearer $accessToken", "GData-Version" => "3.0"];
$httpClient = new GuzzleHttp\Client(['headers' => $headers]);
$resp = $httpClient->request($method, $url);
$body = $resp->getBody()->getContents();
$value = json_decode($body, true);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question