I have been searching for a way to create a bat script(prefered) or powershell script to download files from dropbox via link that are password protected.
I have searched and found the curl might be able to do it, but all of the examples I have found do not work.
Examples of what I have found:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file
curl -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file \
--header "Authorization: Bearer " \
--header "Dropbox-API-Arg: {\"url\": \"https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0\",\"path\": \"/Prime_Numbers.txt\"}"
https://stackoverflow.com/questions/48895701/wget-to-access-password-protected-dropbox-link
curl -vX POST https://content.dropboxapi.com/2/sharing/get_shared_link_file \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--header "Dropbox-API-Arg: {\"url\": \"<SHARED_LINK>\",\"link_password\":\"<SHARED_LINK_PASSWORD>\"}"
One of the errors I"m getting:
Error in call to API function "sharing/get_shared_link_file": Must provide HTTP header "Authorization" or URL parameter "authorization".* Connection #0 to host content.dropboxapi.com left intact
* Rebuilt URL to: \/
* Could not resolve host: \
* Closing connection 1
curl: (6) Could not resolve host: \
'--header' is not recognized as an internal or external command,
operable program or batch file.
'--header' is not recognized as an internal or external command,
operable program or batch file.
Any help would be greatly appreated.