cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Access Token from Chooser API

Get Access Token from Chooser API

mohit1
Explorer | Level 4

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?

 

 

 

1 Accepted Solution

Accepted Solutions

Re: Get Access Token from Chooser API

Greg-DB
Dropboxer
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.

View solution in original post

2 Replies 2

Re: Get Access Token from Chooser API

Greg-DB
Dropboxer
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.

View solution in original post

Re: Get Access Token from Chooser API

mohit1
Explorer | Level 4

Thank you for your support

Who's talking

Top contributors to this post

  • User avatar
    mohit1 Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?