Calling whitelisted methods in Server Scripts?

I have a custom app that makes a rest API call to a third-party API. The app is basically just several whitelisted methods.

I need to make a Server Script for the Lead Form that will call one of the whitelisted methods.

How do I call a whitelisted method in a Server Script?

Hi @oguruma
Please refer this:-
https://frappeframework.com/docs/user/en/guides/basics/frappe_ajax_call

@Safvan_Ph
That looks like Javascript…

How do I access those methods via Python?

Did you mean to call python function externally using python?

Create a python file for your lead form, write a doc event function. Import your whitelisted method in this file. in hooks.py under doc event add dotted path to your doc event function.