When I looking for way to communicate with Sharepoint OneDrive, I can't understand cridentials and way to login with c# desktop app. And I found another way. I create WebBrowser component, then
WebBrowser.URI = new URI ("my sharepoint site").
and get Authorization page. Write my login and password and after that i can create another webBrowser object and get information about file, methadata, information about directories and forders.
But, I can't find way for download file. I have link of download my file.
https://mysite-my.sharepoint.com/personal/myuser_onmicrosoft_com/_api/web/GetFileByServerRelativeUrl('/personal/myuser_onmicrosoft_com/Documents/Shared with Everyone/testExcel.xlsx')/$value.
When I paste this link in desktopBrowser (like a Google Chrome), bwowser automaticaly download this file on my PC.
And there is queston: How can I do this with .Net WindowsForms WebBrowser component.
I did "WebBrowser.URI = new URI ("my link for download file")." and event WebBrowser.FileDownload is called. But i can't find, where my file was downloaded. It's really downloaded? Or maybe I need to use another way? Thanks