You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

mohit1's avatar
mohit1
Explorer | Level 4
7 years ago

Get Access Token from Chooser API

Hi,

In my salesforce project, I need to enable dropbox so that user can select the file from dropbox. Backend logic involves reading the file content and process it further.


I am using Dropbox chooser in form of JS component in my application. I am able to login and select the file  but to get the file content through another API call, I need access token(not my app token). I am not able to fetch the response or not sure how to get the access token. In the URL, not even getting the authorization code when i use chooser.

 

As per the instructions provided in chooser, I can only get the files parameter in response.
do i need to separately call the "/oauth2/authorize" and "/oauth2/token" and then call Dropbox.choose(options)?? or is there any way to get the access token from chooser JS component itself?

 

 

 

  • The Dropbox Chooser does not return an access token, nor does it use the OAuth app authorization flow at all.

    Instead, it returns to your app information about the selected file(s), including links to the file data. There's more information about this in the documentation here:

    https://www.dropbox.com/developers/chooser

    In short, in the `file` result, there is a `link` field, which contains a URL to the file data. Your app should perform a GET request to that URL to get the file data.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    The Dropbox Chooser does not return an access token, nor does it use the OAuth app authorization flow at all.

    Instead, it returns to your app information about the selected file(s), including links to the file data. There's more information about this in the documentation here:

    https://www.dropbox.com/developers/chooser

    In short, in the `file` result, there is a `link` field, which contains a URL to the file data. Your app should perform a GET request to that URL to get the file data.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,883 PostsLatest Activity: 8 hours ago
326 Following

If you need more help you can view your support options (expected response time for an email or 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!