Data connection to Microsoft Business Central

Has anyone successfully connected to Microsoft Business Central using the the built in Microsoft Dynamics 365 Business Central connector?

I have custom APIs exposed in Business Central. I’ve followed the documentation thoroughly - registered my palantir app, etc. It connects to BC but then errors out without a token…

Here is the documentation I’m referencing. The part I don’t know how to do: “Call stored procedures to complete the OAuth exchange” and then how to set up the automatic refresh.
https://cdn.cdata.com/help/FBJ/jdbc/pg_connectionj.htm#:~:text=Call%20stored%20procedures%20to%20complete%20the%20OAuth%20exchange

In short:
InitiateOAuth has to be set to REFRESH but then the documentation says you need to call some commands to record the auth token and do a few more steps that I don’t know how to do…. If you set InitiateOAuth to OFF it fails without the token. And if you set it to GETANDREFRESH it errors saying it can’t open a browser and you need to use a headless configuration, which I also don’t understand how to set up.

Can anyone provide guidance? Or is there a better way to connect to custom APIs in Business Central?