This has been working so well for me, thank you @Gene_Parmesan!!
FWIW, I wanted to report a small quirk that I've noticed, which is that a link can only be copied once the file has completed syncing. If it hasn't completed yet, I get the following error message:
Interestingly, if I right-click the file and use Dropbox's "Copy Dropbox link" action, it will work even if file hasn't completed its sync. Do you have any thoughts as to whether or not this is something that can be addressed by the script, or is this a limitation of the Dropbox API?
Reported by dhermanq on the Dropbox Forum site: