Unable to call script API via non system user

Version - 8.1.3
Our objective is to call custom script via API from a user with auth module RoleBasedPerson.
we have done the following steps-
1) created a program function and assigned our custom script to it.
2) created a rolebased permission group and custom application role
3) Assign the custom permission group to our custom program function
4) Added a user in custom application role.
5) Now upon accessing the API with the said user, we are getting 403 forbidden error with message - You are not allowed to use that feature.

Note= This script call via API is working abs fine when executed via a system user ( for e.g viadmin).

Please suggest.

Parents Reply Children
No Data