python-api-client
python-api-client copied to clipboard
401 no matter what I do, I can get it to work with curl
I cannot get the API to connect to my kanboard. Everything I've tried leads me to a 401, except using curl. Curl only works if I use X-API-Auth. I don't know how to use custom headers with python API. Please help me. I'll provide any info needed
I was able to get it figured out, well a friend helped me. There's an optional 4th parameter that seems to be missing any documentation that lets you set the header type.
Note that I've also had trouble making it work just following the doc; what I ended up was something like this:
kc = kanboard.Client(...)
kc.execute(
method='createTask',
project_id=1,
title="hello",
description="world",
)
and using method names and arguments from the API documentation, eg. this page for createTask: https://docs.kanboard.org/v1/api/task_procedures/#createtask
I suspect the doc could be improved, but knowing that this is a low-maintenance project I don't expect author to fix it; maybe if someone came up with concrete MR.
There is an example in the project readme to use a custom authentication header if that still needed: https://github.com/kanboard/python-api-client#use-a-custom-authentication-header