N8n node can't add a label to a task

Hello !
I have created a Discord bot with n8n which at the end create a task on my vikunja instance.
The problem I have is that I tried to add a label on the task created with another node, but it gives a 400 error.
Tried another workflow on n8n to test adding labels to existing tasks, but the error remains the same.

Except that, loving vikunja !

Hi, could you please share which API calls you’re using to add labels?

I’m not sure what API calls the node is using ?
This is what I have on n8n :

And this is the log from docker :

srv-vikunja-1  | 2024-03-09T15:33:36.330871944Z: WEB    ▶  PUT 400 /api/v1/tasks/17/labels 25.862361ms - n8n

I’m not too familiar with N8n unfortunately, so maybe need to defer this to someone with more experience. Is there any way to see the request content and response?

Does the api token you’re using to communicate with Vikunja has permission to add labels?

I checked all the permissions for the token (except the team members admin), so i think it have them with the TasksLabels group ?

Yes, that should be it. Does it work if you run the following curl command with the api token you’re using for n8n?

curl -X PUT -H "Authorization: Bearer $BEARER" -H 'Content-Type: application/json'  -d '{"label_id":42}'

(Replace $BEARER with the token or set it in the cli first, and replace the label id with an existing label)

It worked :thinking:

One thing I haven’t added is that the node cannot show a list even with a correct token.
It shows “Could not load list please check credentials”.