Download files from Powershell

Hello dear Community

I just created a little application with an update functionality.
For this I need to be able to download files with a scripting language like powershell.

I can get files from seafile in powershell with:

But I want some security for my files.
The DownloadFile method offers the possibility to enter Credentials (Password) but I could not get that to work.

Then I thought about your REST Api from which I have my token. But I can’t find no way using this token for my purpose.

Long text short meaning:
How can I download files securely from a seafile server using powershell, batch or VBA?
(Curl is installed.)

The environment is windows 7 - 10 with powershell 3-6.

Thanks for every idea und suggestion!

Sincerely Ale