jamiebrynes7 / obsidian-todoist-plugin

Materialize Todoist tasks in Obsidian notes
https://jamiebrynes7.github.io/obsidian-todoist-plugin/
MIT License
912 stars 69 forks source link

Error 403 and 401 #229

Open ojmocodes opened 1 year ago

ojmocodes commented 1 year ago

Version 1.11.1 for plugin Most recent Obsidian

When I try create a new task I get "Failed to create task: 'Request failed, status 401'" and everywhere where I have my ```todoist I receive "Error: Request failed, status 403".

Any help appreciated

Kettenotter commented 1 year ago

For anyone getting the 403 you might have:

  1. Not restarted obsidian after pasting the API key
  2. Not pasted the right key: It's in your Todoist Settings under Integrations -> Developer -> API Token

(Like me I first pasted Calender Subscription URL and then after pasting the correct API Key forgot to restart obsidian)

PhocaMachina commented 1 year ago

Same here Obsidian 1.3.4 Plugin Ver 1.11.1 I'm also getting "Failed to create task: 'Request failed, status 401'" but I'm getting "Error: Request failed, status 400" at todoist code blocks. I did pass the correct key and restarted obsidian afterwards but still got the same errors.

jamiebrynes7 commented 1 year ago

@Kettenotter is correct, 403 and 401 status codes indicate that the API token is incorrect in some way.

@PhocaMachina - getting a 400 response back is more interesting though, would you mind sharing the code block that produces that response? (Is it all code blocks?)

LeapingLue commented 1 year ago

As PhocaMachina seems to have missed out on your last question: I am receiving the Code 400 response as well. This is how my code looks like. I did try it with the least amount of code as well though and am still getting this error.

todoist { "name": "Aufgaben", "filter": "(überfällig | (fällig vor: 2023-06-13 & fällig nach: 2023-06-05))", "sorting" : ["date"], "group" : true }

I didn't want to assume any english equivalents for my german code but I haven't changed those keywords like "fällig" (due), "überfällig" (overdue) or "Aufgaben" (Tasks) since months.

thesamim commented 1 year ago

On the off chance this helps someone: I started getting this error a couple of weeks ago and ignored it assuming it was temporary or user error. Today, I got tired of it and went to Todoist.

Guess what: The API key on my account had changed. With no notice.

Updating the API key in Obsidian, of course, fixed it.

Hope this helps.

CatOtchi commented 1 year ago

Still receiving "Error: Request failed, status 401" after 1- Updating API key 2- Issuing a new API key and entering the new key 3- Manually checking it's the correct key I'm running v1.3.7 of obsidian on a Mac.

thesamim commented 1 year ago

Still receiving "Error: Request failed, status 401" [...] Are you on version 1.11.1 of the plugin?

Asking because I haven't seen that issue in a long time...

CatOtchi commented 1 year ago

Yep, running 1.11.1. If it's any help I'm on todoist version 8.4.3 (12238)

DarkCartoons commented 7 months ago

I can see this is fairly old now, but for what it's worth, I'm getting the same 401 error with my setup. No amount of double checking, re-issuing the API key, restarting obsidian etc. is solving it. plugin version: 1.11.1 Todoist Version: 5145(beta) Obsidian version: 1.5.3