We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
ROR
8 years agoExplorer | Level 3
Download Files From Dropbox Using Ruby
Hi ,
I have xlsx sheet in my dropbox . It have 10 columns and 220 rows .
My databse table also have 10 columns, need to feed the xlsx sheet values to table .
Future i will add addtional rows in the same sheet .
I have a button called Sync Data in my applica tion . Whenever i click that button need to verify the sheet(new records) and need to update in DB as well .
4 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
The Dropbox API does offer the ability to download files. Dropbox doesn't have an API v2 SDK for Ruby in particular, but you can use the HTTPS endpoints directly. For example, to download a file, you would use /2/files/download:
https://www.dropbox.com/developers/documentation/http/documentation#files-download
Or, you can use a third party library:
https://www.dropbox.com/developers/documentation/communitysdks - ROR8 years agoExplorer | Level 3
Hi Greg,
I followed the documentation ,i created the app inside the dropbox and got the access token . But the problem is,each time dropbox create new access token keys . Then how can i integrate it with my appication and fetch the files .
I have set of folders in my dropbox , in frequent time interval i want read the folder and need to download the files and save into database . How can i do that ? . I am using ruby on rails
- Greg-DB8 years ago
Dropbox Community Moderator
Once you retrieve an access token, you can store and re-use it for future calls. While you can revoke access tokens on demand, they don't expire on their own.
To list the contents of folders, you should use /2/files/list_folder[/continue]:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
To download files, you should use /2/files/download:
https://www.dropbox.com/developers/documentation/http/documentation#files-download - ROR8 years agoExplorer | Level 3Thanks for the reply and solution. I will check and let you know .
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!