Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!
That was quicker than I thought it was going to be, so I reverted to 2.5.13.
Sorry to ask a N00b question, but I <script> link to the versions on https://cdnjs.com/libraries/dropbox.js/ as that means it's just one file - can you let me know when it's on there? And is there a reason I shouldn't do that generally? I'm now downloading each .min.js file onto my server and linking to it.
v3.0.1 is now available at https://cdnjs.com/libraries/dropbox.js/.
The Dropbox API v2 JavaScript SDK follows "semantic versioning":
https://github.com/dropbox/dropbox-sdk-js#versioning
That means that we will increase the major version number whenever there are breaking changes, such as the new constructor above. In general, you should avoid automatically using the latest version, i.e., including any major version updates, as your code may break when a major update is released. You should only upgrade to the latest major updates in your released app once you've had a chance to test it in your app and make any necessary changes
Thanks for the advice - I was linking automatically to the latest version which is why I had breaking. I think I'll proceed with downloading a specific version into my own library and linking to that to avoid breaking.
As a general question, how long are the lags when getting new links - just tried https://cdnjs.cloudflare.com/ajax/libs/dropbox.js/3.0.1/Dropbox-sdk.min.js and got "404 Not Found" despite it being listed on https://cdnjs.com/libraries/dropbox.js/
Thanks!
No problem. As things seem to be working on the 2.5.13 version I'll probably hold off on moving over for a few days/week+. I''ll post the outcome on this forum though when I do.
Thanks for all your help!
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!