这是我在React.js中的代码,实际上我想从Dropbox Api获取所有媒体文件的url。我收到了https://api.dropboxapi.com/2/users/get_current_account和https://api.dropboxapi.com/2/files/list_folder的回复,但是我不知道如何进一步获取所有文件的URL。
handleSocialLoginDropbox(){
axios({
method:'post',
url:'https://api.dropboxapi.com/2/users/get_current_account',
responseType:'stream',
headers: { Authorization : 'Bearer access_token'}
})
.then(function(response) {
console.log(response)
axios({
method:'POST',
url:'https://api.dropboxapi.com/2/files/list_folder',
headers: { Authorization : 'Bearer access_token', 'Content-Type':'application/json'},
data : { path: "", include_media_info : true }
})
.then(function(response) {
console.log(response)
});
});
}