Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Recently I have included Dropbox in my ionic 1 android application through Dropbox JavaScript SDK for user data backup. I have used inAppBrowser for the authentication process. Everything is working perfectly and 100+ user already using this feature.
After 100+ user I have applied for production request but it's declined reason for OAuth app authorization flow inside a web view, instead of the system browser.
For handling this situation I have made an ionic plugin for native authentication flow of Dropbox android SDK. I have developed & configure my plugin using Dropbox android SDK (https://www.dropbox.com/developers-v1/core/sdks/android) for getting access token. This part also working fine and I am getting access token successfully.
But problem is, when I am sending my Access Token to JS SDK (https://github.com/dropbox/dropbox-sdk-js) it's returning 400 response The given OAuth 2 access token is malformed
var dbx = new Dropbox({ accessToken: ACCESS_TOKEN }); dbx.usersGetCurrentAccount() .then(function(response) { console.log(response); }).catch(function(error) { console.error(error); });
In this situation what can I do? I can not figure out the solution
Thanks! I'll work on getting that environment working to try to reproduce this. (I can't make any promises though, as we don't officially support Cordova/Ionic.)
I'm looking through the code though, and I don't see where you actually construct the Dropbox JavaScript client object and call usersGetCurrentAccount, per your original comment. Can you add that? Given the rest of the investigation here, it certainly seems possible that that portion will be relevant (e.g., how you're transferring the token over, when/where you're loading and using the JavaScript library, etc.).
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!