Meteor et Dropbox

Hi all
I used dropbox with meteor in previous apps and everything worked fine.
Today I have a new application to make where I have to fetch files in dropbox.
I used the same code and it doesn’t work. The code is as follows:

	let Dropbox = require('dropbox').Dropbox;
	let dbx = new Dropbox({accessToken: '58i ... cCIe'});
	dbx.filesListFolder({path: ''})
		.then(function (response) {
			console.log(response.result.entries)
			dbx.filesDownload({path: "/INFOSITE.txt"})
				.then(function (response) {
					console.log(response)
					let blob = response['fileBlob'];
					let reader = new FileReader();
					reader.addEventListener("loadend", function () {
						console.log(reader.result)
					});
					reader.readAsText(blob);
				})
				.catch(function (error) {
					console.log(error)
				})
		})
		.catch(function (error) {
			console.log(error);
		});

And the result is the following:

	Array(3)
	Failed to load resource: the server responded with a status of 400 (Bad Request)
		DropboxResponseError: Response failed with a 400 code

array (3) is the result of “filesListFolder”.
against “fileDownload” throws an error.

I have searched the internet and even if this problem is mentioned, I have not found anything that allows me to solve this problem.
Quelqu’un peut-il m’aider à trouver une solution. Ca m’aiderait beaucoup.

Merci
Yvan COYAUD

Downloading seems to now require a different use of the Dropbox API, see this example. Maybe the API has changed since you’ve developed your previous apps.

Hello and thank you for your answer.

Cannot get this script to work.
It seems that to download a file, you now have to go through a shared link. OK, except that “sharingGetSharedLinkFile” which allows to obtain this link always generates the same error “Response failed with a 400 code” and that I cannot know what the error code 400 corresponds to

So I’m going to do what I don’t like at all, go back and load the SDK that works with my old applications, namely 5.2.1 (currently 9 …)

If anyone reading this has the beginning of the shadow of a solution, I stay tuned.
Thank you
YC