Error in call to API function "files/get_thumbnail": HTTP header "Dropbox-API-Arg": could not decode input as JSON
here is code
var folder_flag = 0;
axios({
method: 'POST',
url: 'https://api.dropboxapi.com/2/files/list_folder',
headers: {
Authorization: 'Beareraccess_token',
'Content-Type': 'application/json'
},
data: {
path: "",
include_media_info: true
}
})
.then(function(response) {
console.log(response);
for (var i = 0; i < response.data.entries.length; i++) {
if (response.data.entries[i][".tag"] == "folder") {
folders.push(response.data.entries[i].name);
folder_flag = 1;
} else if (response.data.entries[i][".tag"] == "file") {
axios({
method: 'POST',
url: 'https://content.dropboxapi.com/2/files/get_thumbnail',
headers: {
Authorization: 'Bearer access_token',
'Content-Type': 'application/json',
'Dropbox-API-Arg': response.data.entries[i].id
}
})
.then(function(response) {
console.log(response);
file_flag = 1;
});
} else {
console.log('No File or Folder availabel right now');
}