cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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
Go to solution

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

Greg-DB
Dropbox Staff
Go to solution
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

Greg-DB
Dropbox Staff
Go to solution
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.

mohit1
Explorer | Level 4
Go to solution

Thank you for your support

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    mohit1 Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?