<?php
$baseURL = "https://api.smartsheet.com/2.0";
$getSheetURL = $baseURL. "/sheets/xxxxxxxxxxxxxxxx";
$accessToken = "xxxxxxxxxxxxxxxx";
$headers = array("Authorization: Bearer ". $accessToken);
$curlSession = curl_init($getSheetURL);
curl_setopt($curlSession, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, TRUE);
$getSheetResponseData = curl_exec($curlSession);
// Remove this line when done debugging
var_dump($getSheetResponseData);
$sheetObj = json_decode($getSheetResponseData);
echo "<h1>Sheet name: ". $sheetObj->name ."</h1>";
?>
Here is the code that I am attempting to run, I cannot figure out why but each time I run it it returns bool(false) and nothing for sheet name. It's like it cant reach the sheet or something. This is my first time using the smart sheet API so I am very unfamiliar with it.
Any help would be appreciated!