Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I want to implement a functionality that user can login to their dropbox account by my web application and i want to show all folder of dropbox on my web application screen . How can i do this .
Start with the documentation and sample apps.
Thanks for reply . But i am using api funtion already to get files and folder by api functions of a particular account by api acess token. But now the issue is that i want to get all the files and folder of login user( not from a particular account on which app is created ) Is their any funtionallity that i can get this by user login id or some thing else
You need to get them to link your app to their Dropbox account, and then use the token that process gives you.
As I said, read the documentation and the example apps.
i am using oAuth1 to login a user. Now after login i am getting access token of a user. But when i am trying to fetch all files and folders using v2 version by https://api.dropboxapi.com/2/files/list_folder using this access_token its shows a error . my response after login is
Array ( [oauth_token_secret] => <redacted> [oauth_token] => 0z8UB9b6JHyfUqBc [access_token_secret] => <redacted> [access_token] => 2oez4dz7r9w4xmlf )
Also can i use oauth 1 for v2 version
API v2 only supports OAuth 2, not OAuth 1, so you won't be able to use an OAuth 1 access token with OAuth 2.
The OAuth 2 endpoints are documented here:
https://www.dropbox.com/developers/documentation/http/documentation#authorization
(If you need to, you can use existing OAuth 1 tokens to get OAuth 2 tokens using /1/oauth2/token_from_oauth1.)
can you please tell me the parameter for https://api.dropboxapi.com/1/oauth2/token_from_oauth1 url . how can i pass the above access token to this to convert oauth1 access token to oauth2 access token . i am using below code
$ch = curl_init();
$postData = array(access_token => "32uqesryirha3ubf");
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://api.dropboxapi.com/1/oauth2/token_from_oauth1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode($postData),
CURLOPT_HTTPHEADER => array('Content-Type:application/json'),
CURLOPT_SSL_VERIFYPEER => false
));
echo $output = curl_exec($ch);
curl_close($ch);
That endpoint requires OAuth 1 signing. For example, see step 4 in this blog post:
https://blogs.dropbox.com/developers/2012/07/using-oauth-1-0-with-the-plaintext-signature-method/
yuppy thanks Gregory .Its working 🙂
Hey Gregory
I have a query regarding download api. I am trying to download files by curl thorugh api.https://content.dropboxapi.com/2/files/download. But when am trying to send a curl req by sending below code it return nothing.
$ch = curl_init();
$postData = array('path' => $folder);
$data = json_encode($postData);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://content.dropboxapi.com/2/files/download',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array('Content-Type: ', 'Authorization: Bearer ' . $key, 'Dropbox-API-Arg:' . $data),
CURLOPT_SSL_VERIFYPEER => false
));
echo $output = curl_exec($ch);
curl_close($ch);
where $folder = /deepikag4@chetu.com/newTask.xlsx
Can you please help me out
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!