Discuss Dropbox Developer & API
I want to use the Dropbox API to access the Dropbox for managing my data storage. I am successfully able to connect to dropbox by adding an app by setting appropiate permissions to the app and by generating access token. However, I would like to Access the folders that are outside my personal folder.
Team DigitalAqua
|-Santhosh Kumaran
| -test
| -text1.txt
| -Santhosh Kumaran - Shortcut.lnk
| -santhosh.kumaran@xxxx.xx’s files
|-Videos
| - A
| - B
| - B
My intented work:
Step 1: Connect to the Dropbox: ->Success
Step 2: Specify the folder: Works for my folder Santhosh Kumaran
Step 3: List the files in the folder
I do not know how to do it
When you didn't specify something else, the default behavior is your member folder to be used as a root (as you find it out already). Team accounts are organized in namespaces (take a look here for more info) and you can select what to be your root in Dropbox Python SDK using with_path_root method.
Hope this gives direction about your main concern.
@santhoshkelathodi wrote:...# Token Generated from dropboxTOKEN = "<Generated_TOKEN>"dbx = dropbox.Dropbox(TOKEN)...
Hm..🤔 Are you aware that access token is short lived and you will need to regenerate it regularly? To avoid doing it by hand, you can use refresh token. Handy example how you can use it can be seen here. A complete example application may be of your interest too.
@santhoshkelathodi wrote:...
Step 4: Make all the files and folders at the folder path to online-only to avoid the local storage to be optimized.I do not know how to do it
You cannot do that, since it's per application setting and you need direct communication to every particular application, where you need to set file status, not to Dropbox server. At present, Dropbox API may communicate to Dropbox servers only, not to installed applications directly.
Thank you for the answers. I will go through the examples and the solutions provided to check if I can access the other folders. Regarding the question on whether I can set the local folders to online-only mode ( By the way, this is possible by right clicking on the respective folder), is your answer that it is not possible programmatically using dropbox APIs?
@santhoshkelathodi wrote:... ( By the way, this is possible by right clicking on the respective folder), ...
Exactly, in such a case you're accessing no the cloud folder, but local application folder! 🙂 Hope you can make difference.
@santhoshkelathodi wrote:..., is your answer that it is not possible programmatically using dropbox APIs?
As I said, API accesses only the cloud. So, Yes. Let's hope this will be changed, but better don't rely on.
I have submitted a feature request for files and folders to be available offline and online-only using the API.
I am unable to provide a timeline of if and when this feature will be implemented, however.
@DB-Des wrote:...
I am unable to provide a timeline of if and when this feature will be implemented, however.
Hi @DB-Des,
"Will be implemented"??? 🤔 What actually has to be implemented? Everything is implemented already! 🙂 The only missing thing is the documentation. How fast staff responsible for technical documentation can work? 😀 It's matter of wish, nothing else. The communication, as a option, is available through the local sockets open by the installed Dropbox application and is not from yesterday. Can you point out to some description? That's the missing thing. Implementation in SDKs would helpful too (together with corresponding documentation of course).
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!