Download File with custom application

Hello! i’m try to automate a download file from a custom windows application. i have the route of file: ownclouddomain with the {fileid} at the end. And only know the password, but don’t have a user. what i’ts the best route to download the file from a custom desktop application. it’s possible in a C# Console Application or asp net

Thanks for your help