How do I run onifyElevatedApiRequest from a script task?
I am trying to run `onifyElevatedApiRequest` from a script task using users token but it does not work. Is it possible to run from a script task?
This is what I am trying to do:
```javascript
let onifyHeaders = {
'Content-Type': 'application/json',
'Authorization': environment.settings.authorization
}
var resourceOptions = {
url: `admin/resources/file?stream=false&path=${templatePath}`,
headers: onifyHeaders
}
let result = await environment.services.onifyElevatedApiRequest(resourceOptions);
```
Posted by Robert Lundsten almost 3 years ago