Soooo.... this has been driving me nuts for the past day or two. I am sure I am missing something obvious, but I have no other paths forward. So here goes. I have created an app. And I am trying to create file request through curl using the token I created.
But i am getting Error:--
Error in call to API function "file_requests/create": This function requires its argument in the HTTP request body, but your request body is empty. Code bellow. Please help!!!
$api_url="https://api.dropboxapi.com/2/file_requests/create";
$bauthtoken='';
$eheader = array(
'Content_Type: application/json',
'Authorization: Bearer '.$bauthtoken,
'data:{"title": "Ste","destination": "/File Requests/Ste","deadline": {"deadline": "2020-03-22T17:00:00Z","allow_late_uploads": "seven_days"},"open": true}'
);
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $eheader);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$result = curl_exec($ch);