@suitendaal,
In the script above, the ip address and user credentials are read from WebIQ variables. Do you have these paramaters set?
Can you confirm there is a token retrieved from the ctrlX OS authentication system?
const token = response.data.access_token;
Once you have the token, you can upload files using the webdav path. For example,
https://127.0.0.1:8443/solutions/webdav/appdata/test/test.txt
... View more