Community
How do I run onifyElevatedApiRequest from a script task?
about 3 years ago by Robert Lundsten(edited)
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:
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);