Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
janhec
5 years agoHelpful | Level 6
Easiest way to get (dropbox) file datetime using a dropbox link
Hi All,
I share a project I'm working on through some executables on dropbox, which users get a link to, so they can download.
I prefer, obviously, that they have an account, so they will have au...
- 5 years ago
Using the /2/sharing/get_shared_link_metadata endpoint is the right way to get metadata from a shared link, but that does require an access token, as you found.
There isn't another way to get the modified time of the file from the shared link directly, but you could instead use that "etag" value returned with that 200 response when accessing the shared link. You can store the etag for the version of the file you last downloaded, and before downloading it again, check the current etag value. If the etag value hasn't changed, that means that the content hasn't changed.
Greg-DB
Dropbox Community Moderator
3 years agoUsing /2/sharing/get_shared_link_metadata is still the right way to get metadata from a shared link, and that now supports both User Authentication (using an access token, as before) as well as App Authentication (using an app key and secret instead of an access token). If that works better for your use case now, I suggest looking into that. You can get an app key and secret by registering an app here; be sure to use "Full Dropbox" access for this scenario (even though you won't need to actually connect it to an account and get an access token to call /2/sharing/get_shared_link_metadata with app authentication).
When calling /2/sharing/get_shared_link_metadata for a file, you can check the returned "rev" value, which is a revision identifier, in addition to "server_modified". Check out the documentation there for the full field information.
As for the etag value when accessing the shared link directly, that is still working and being returned with the etag for me when I try accessing a file directly using curl with a valid shared link to a file with "dl=1". I see in your output that you're getting back an HTML page. I recommend checking if the shared link you're using is still valid. You can manually try it in a web browser to see what that HTML page is; it may contain an error message regarding the shared link.
Also, the 'X-Dropbox-Request-Id' value is expected to change on every request, as that is an identifier for each request made to Dropbox, not the file being accessed itself.
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!