I'm using filesGetTemporaryLink
from the Dropbox API to get get a link to download a file. I save the link returned from this method to my db. It works for the most part but seemingly randomly I get a 410 error.
I'm wondering if these links are no longer accessible after a certain amount of time (I guess that could be expected from the name but I couldn't find another method to get a dl link). Should I be using something other than filesGetTemporaryLink
to get a link I can save to my db?
Thanks!
The links returned by filesGetTemporaryLink
do expire after four hours, at which point you will get that 410 error when trying to access them.
If you need a link that doesn't expire by default, you can use sharingCreateSharedLinkWithSettings
instead, and modify the resulting link as documented here. Note that those links do get listed in the user's links list though.
If you can avoid the need to have a link, you can instead download the file data using filesDownload
, which would be preferable.