I'm trying to get a temporary link for file with using get_temporary_link from file_properties with below listed PHP code:
$getlink_url = 'https://api.dropboxapi.com/2/files/get_temporary_link';
$getlink_headers = array ( 'Authorization: Bearer '. $token,
$ch1 = curl_init($getlink_url);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch1, CURLOPT_HTTPHEADER, $getlink_headers);
$response2 = curl_exec($ch1);
But i receive an error:
[php7:notice] [pid 25434] [client ::1:40512] Error in call to API function "files/get_temporary_link": request body: could not decode input as JSON, referer: http://localhost/DropTest.html Could you please let me know what i'm doing wrong. I found solutions for other languages but not for PHP.
Thank you in advance for support.
... View more