Python API calls error

I’m a game and XR developer and since the release of Penpot and seeing that some Figma to Unity and Unreal plugins exist in the wild (some unfinished), I had an idea to create the same for Penpot. An Unreal editor python plugin to connect Penpot and Unreal Engine.

I’ve already setup a local docker environment for development on Windows and was able to read the logs to figure out what API was called from the frontend to get information from the backend.

I’d like to get some information on how to get an authentication key to access user’s data to select files to export? I’m assuming for penpot auth it’s using api/rpc/command/login-with-password and getting the "~:id"? But after that, calling some endpoint with the required profile-id , I get 500 - Internal Server Error (top) or 401 - Unauthorized (bottom) with

I’m mostly stumped this one, since I don’t work with web requests and I haven’t worked with authentication. How would I implement acquiring the authentication data from other authentication providers if the user doesn’t use penpot authentication?