Whenever I use https://api.dropboxapi.com/2/sharing/get_file_metadata with apex code or postman, I receive an error message i.e., Error in call to API function "sharing/get_file_metadata": request body: could not decode input as JSON
My apex code is as follows:
string token = 'https://api.dropboxapi.com/2/sharing/get_file_metadata';
HttpRequest r = new HttpRequest();
r.setEndpoint(token);
r.setHeader('Authorization','Bearer ' +accesstoken);
r.setHeader('Content-Type','application/json');
r.setHeader('data','{ "file" : "id:ooT7g_X2tkAAAAAAAAAAEw" ,"actions" : [] }');
r.setMethod('POST');
r.setTimeout(60000);
Http h1 = new Http();
HttpResponse res1 = h1.send(r);
string resp1 = res1.getBody();
System.debug('MetaData Status :: \n' + resp1);