Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Mark S.115
10 years agoNew member | Level 1
sharing folders using api
About a month ago I implemented sharing files via Dropbox in my app. Now I am trying to enable sharing a pair of files via Dropbox (a file and an image). I mention this only because I can currently share a file and then have the app upload the file from the link automatically and it's working great.
When trying to upload from a shared folder... not so great.
Couple of things I noted about the link to a folder, it has /sh/ instead of /s/. Also, it has 2 codes after the /sh/ separated by a "/":
/sh/8r3m3mfhh56qcba/AADjD4x_TJlPTNXpqn5MQ_Lfa
Here is the url I attempted to use to extract a file from this shared folder:
https://www.dropbox.com/sh/8r3m3mfhh56qcba/AADjD4x_TJlPTNXpqn5MQ_Lfa/QuickList.skchar?dl=1
Dropbox threw back an error that said:
Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x156aaeb0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Can you offer any advice on this?
3 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
When you get a shareable link to a folder, instead of a file, you are expected to get a link /sh/ instead of /s/. When you use dl=1 on a shared link for a folder (/sh/) you should get a zip download of that folder.
Regarding the trouble you're having here, first, is this a sample of an actual link you're trying to us? When I try to access it, using either dl=0 or dl=1, I get a 404 error, e.g., meaning that there isn't anything at the path for the link anymore. If this is the actual link you're trying, that may be related to the issue you're seeing.
Regarding the error message you posted, "no valid 'aps-environment' entitlement string found for application", that isn't something that comes from Dropbox, but rather seems to be an Objective-C error message, e.g.:
If you're still having trouble with this, can you post your code and output?
- Greg-DB10 years ago
Dropbox Community Moderator
I see, thanks for clarifying. Unfortunately, you can't index files inside a folder via a shared link like that. (That is, you can't add the file name for file in the folder to the original link to get a link to that particular file.) I'm sending this along as a request for a proper way to do this though.
- Mark S.11510 years agoNew member | Level 1
Thank you. I can work around it now that I know to stop beating my head against the wall.
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!