Combination user accessed and machine accessed web app

We are using OKTA as our identity provider for an express webapp but would now like to allow that web app to be accessed programmatically from python scripts. We are currently using okta/oidc-middleware for authentication. What is the best way to achieve this?