Python API always returns 401

For the life of me I cannot get the Python API to work. The only way I don’t get a 401 is if I use CURL and X-API_Auth. I know for a fact that I have the username and API token correct.

I’m not sure how to use custom headers with kanboard.client() I can’t find documentation and I’m going crazy.
Thanks

Okay I figured it out. For anyone having an issue in the future the python API takes a third optional parameter that’s not in the documentation. If you set it to ‘X-API-Auth’ it will handle the base64 encryption.

Nothing I did would make basic auth work. The only way I could use the API was with x-API-Auth