It looks like there's a new structure with dropbox, as of this morning I've been creating my dbx object by calling
var dbx = new Dropbox.Dropbox({ clientId: CLIENT_ID });
rather than
var dbx = new Dropbox({ clientId: CLIENT_ID });
Whilst that seems to do the trick, when I try
dbx.usersGetCurrentAccount()
which seems to have worked before, I now get the error:
Uncaught (in promise) {error: "Error in call to API function "users/get_current_a…nt": request body: could not decode input as JSON", response: Response, status: 400}
The documentation at https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#usersGetCurrentAccount__anchor suggests no input is required for this? So is this a bug, or can I access the current user's account a different way?
In my instance, I would like to access the email address the user logged in on.
Thanks in advance!