This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Calling Scripts via Application Server RESTful API using Common_StartScripts permission not working

Hi,

We are trying to call a custom script via the Application Server RESTful API. 

We have made sure that the user who does this has an application role assigned which has the permission group Common_StartScripts. 
This application role also has the permissions groups Common_TriggerEvents and Common_StartCustomizerMethods, and the user can successfully call both events and methods directly via the API. 

When we call the custom script the following error is shown: 

(part of the returned json)

"number": 810323,
      "message": "You are not authorized to run this method.”

 

We believe the error could be due to the reason that the custom scripts within its code calls the FillOrder method. This is perhaps an issue as this method can only be executed via job server. Perhaps via the API when this script is called it presents this error before even running it? 
Currently we can call the custom script via a process chain which is tied to an Event, and  this event is then called via the API.

Is the above assumption correct or are we missing something?

Any help its greatly appreciated as usual.

Kind regards,

Ash

Parents
  • Hi Markus

    Thanks again for the quick response.

    I never realised that from 7.1 onwards the script itself needed that program function assigned.
    I have done this but now I receive the following error:

    "This method can only be called internally."

    I believe this may now relate to the FillOrder method I mentioned in the initial post?
Reply
  • Hi Markus

    Thanks again for the quick response.

    I never realised that from 7.1 onwards the script itself needed that program function assigned.
    I have done this but now I receive the following error:

    "This method can only be called internally."

    I believe this may now relate to the FillOrder method I mentioned in the initial post?
Children
No Data