Help Needed: "Invalid Token" Error When Creating Task via API

based off the endpoint you are utilizing here it looks like you are trying to add a task to a specific project. based off the docs you should be using PUT, so just change:

root@b5dd7b*******:/# curl -X POST http://synology.***************.com:3456/api/v1/projects/1/tasks \
-H "Authorization: Bearer tk_75454cb33****************" \
-H "Content-Type: application/json" \
-d '{
  "title": "Neue Aufgabe",
  "description": "Beschreibung der neuen Aufgabe",
}'

to

root@b5dd7b*******:/# curl -X PUT http://synology.***************.com:3456/api/v1/projects/1/tasks \
-H "Authorization: Bearer tk_75454cb33****************" \
-H "Content-Type: application/json" \
-d '{
  "title": "Neue Aufgabe",
  "description": "Beschreibung der neuen Aufgabe",
}'

and this should work

1 Like