Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
To download other user dropbox file i use
with open("rc.xlsx", "wb") as f: shared_link = "https://www.dropbox.com/s/xx/xx.xlsx?dl=0" metadata, res = dbx.sharing_get_shared_link_file(url=shared_link,link_password ='xxxx') f.write(res.content)
Even so this is not my file i still need mydropbox token to download it. Is it possible to avoid it ?
dbx = dropbox.Dropbox(mydropbox_token)
I also check this but can't acess the solution From https://www.dropbox.com/developers/documentation/python#tutorial
In order to make calls to the API, you'll need an instance of the Dropbox object. To instantiate, pass in the access token for the account you want to link.
Hi @johnhesler,
While you are talking for link access, it's possible. 😉 Link is something public and direct accessible. But you have done a mistake in your code. Take in mind that the same link can has different forms. The link you are using in your code is preview link (ends on '?dl=0'). So, it's NOT pointing to actual file, but a page to targeting preview the same file! In this case you are downloading page's HTML code (did you check it 🙂). To download actual file your link should ends on '?dl=1'. That's it.
Hope this helps.
ADD: Actually you don't need to use any API calls (since you know link pointing actual file). Just download it!
On other side using 'dbx.sharing_get_shared_link_file' requires user authentication. If you want use this method, then you need valid user authentication, despite doesn't matter who gets authenticated.
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!