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: 

Re: shared_link_access_denied when trying to access a shared file using the v2 api (status 409)

shared_link_access_denied when trying to access a shared file using the v2 api (status 409)

davidg59
New member | Level 2

info:  the dropbox folder is in another users' account; I can access the file in question via the browser, even when I am not logged in to dropbox myself, by supplying the link_password when prompted.

 

However, when I use the api v2 and supply my token and the link_password, I receive the shared_link_access_denied.

 

Here is the curl call, (without the identifying information) -- 

 

curl -vX POST \
https://content.dropboxapi.com/2/sharing/get_shared_link_file \
--header "Authorization: Bearer _MY_BEARER_TOKEN_" \
--header "Dropbox-API-Arg: { \"url\":\"_THE_FILEs_URL?dl=1\",  "link_password\":\"_MY_LINK_PASSWORD_\"}"

 

The error I receive:

 

< HTTP/1.1 409 shared_link_access_denied/
< Server: nginx
< Date: Wed, 25 Jul 2018 10:29:50 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Content-Security-Policy: sandbox allow-forms allow-scripts
< X-Dropbox-Request-Id: 7e722bc37889b435a4336c0661f86577
< X-Robots-Tag: noindex, nofollow, noimageindex
<
* Connection #0 to host content.dropboxapi.com left intact
* Closing connection #0
{"error_summary": "shared_link_access_denied/", "error": {".tag": "shared_link_access_denied"}}

 

Any suggestions, please?

 

21 Replies 21

overlookmotel
Explorer | Level 3
Thank you!

Shyam Pratap Singh
New member | Level 2

When you access any resource which is not public access, shared link access denied error will be thrown and this is logical too.

 

So to solve such an issue, first, create a sharable link allowing public access or adding member-only to share the particular resources.

 

1 : Create Sharable Resources

https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_...

 

2: Now Get a link to share :

https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links

 

Call this API first, if there is no sharable link, it will return an empty list else it will provide a sharable link that can be access by the public.

If the list is empty call API mentioned in 1 and you will get a sharable link.

 

3: If you want to share this link and want the resource can be downloaded programmatically, e.g creating QR code of sharable link and once scan be any other user, the particular resource should be downloaded. 

https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file

Need more support?