I have a vue application where I want to fetch every information of my account with the filesListFolder method but I am getting the following error:
TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
at eval
Could someone explain to me what is wrong with my code? I did not really understand the error message. I have not selected the app folder option in dropbox generating my app but the full dropbox one.
Here is my code:
getImages() {
require("isomorphic-fetch");
const Dropbox = require("dropbox").Dropbox;
const dbx = new Dropbox({
accessToken: 'AcessToken',
fetch
});
dbx.filesListFolder({ path: '' })
.then(function(response) {
console.log(response.entries);
})
.catch(function(error) {
console.error(error);
});
},
}