Hi @Alpha35770768viiv I actually thought this was possible, but I've just realised that it can be done in Indesign (and, I think, Photoshop) but sadly not Illustrator. Indesign uses the app.doScript method to run curl on macOS for example, but app.doScript in Illustrator seems to just run Actions. I'm out of my depth here, so I will wait for an expert to give us a definitive answer.
Having said that, if you are able to get a file reference, for example if you have Dropbox integration and dropbox is set up to automatically sync to your computer, then you can handle that like any other file. For example on MacOS I get a path like this:
/Users/mark/Library/CloudStorage/Dropbox/ScriptingTest/Photoshop/test-1.js
I imagine this would be the same for OneDrive and iCloud etc, but only if they are set up to sync (automatically download, specifically).
Sorry I couldn't be more help.
- Mark