I'm working to a web app that let a user see his video files stored on google drive and play them with an html5 player.
I used Google Picker to show user files. When picking a file, the user is redirected to an url like myfile.php?id={file_id}
On the landing page, if I use a code like this below, I receive a 403 error (failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden)
.
<?php
$url="https://www.googleapis.com/drive/v1/files/".$_GET["id"]."";
$json = file_get_contents($url);
$data= json_decode($json,true);
print_r($data);
?>
Do I need to check again that the user is logged in? If so, which is the quicker way?