Hi,
When I'm calling the filesListFolderLongpoll() method I get the following error:
status: 400,
text: 'Incorrect host for API function "files/list_folder/longpoll". You must issue the request to "notify.dropboxapi.com".'
I'm getting a cursor with filesListFolderGetLatestCursor() and then I give the cursor I just retrieved to filesListFolderLongpoll().
Here is a sample code:
var Dropbox = require('dropbox');
var dbx = new Dropbox({accessToken: 'MY_ACCESS_TOKEN_HERE'});
dbx.filesListFolderGetLatestCursor({path: '',
recursive: false,
include_media_info: false,
include_deleted: false,
include_has_explicit_shared_members: false
})
.then((last_cursor) => {
dropboxLongpoll(last_cursor.cursor);
})
.catch((err) => {
console.log(error);
});
function dropboxLongpoll(last_cursor) {
dbx.filesListFolderLongpoll({cursor: last_cursor, timeout: 30})
.then((result) => {
console.log(result);
// [ ... do stuff ...]
})
.catch((err) => {
console.log(err);
});
}
I'm using Dropbox javascript SDK in version 2.3.0.
Did I make any mistakes ?
Thank you!