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: 

API doesn't allow shared links from not owner

API doesn't allow shared links from not owner

brookesteele
New member | Level 2

I have a python script to pull and process team data where the I (a.k.a. developer) processes data using a shared link pasted in by a team member.  The goal is to process data supplied by team on a server.  Fun fact.  I can only process data using a public shared link that I created.    What permissions/settings are required so that I can pull data using the api and a shared link that I didn't personally create?  Why are permissions on public links overridden by API?  I can access the data from the links if I don't use the API, but that defeats the purpose.  I've tried modifying the shared link settings, but neither I nor the team admin are authorized to do this.

 

 

2 Replies 2

Greg-DB
Dropbox Staff

Using the Dropbox API v2 Python SDK, you should be able to use the sharing_get_shared_link_metadata and sharing_get_shared_link_file/sharing_get_shared_link_file_to_file methods to get the metadata and file data, respectively, from a shared link, as long as the links settings allow it (e.g., it's publicly accessible), even if you're not using an access token for the shared link owner.

 

Could you share the relevant code you're running and the error/output you're getting so I can take a look and get a better idea of specifically what's not working for you? It may be helpful if you can share a sample shared link, but please don't share any access tokens. Thanks!

brookesteele
New member | Level 2

My solution was to use  the force download option of my shared link and just download it w/o using the dropbox api.  In my case, the api is unnecessary.    

import requests

...

force_link =external_link.replace('=0', '=1')
r = requests.get(force_link, stream=True)
with open(dest_file, "wb") as video:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
video.write(chunk)
return

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    brookesteele New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?