obsidian-todoist-plugin icon indicating copy to clipboard operation
obsidian-todoist-plugin copied to clipboard

Error 403 and 401

Open ojmocodes opened this issue 1 year ago • 9 comments

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

ojmocodes avatar May 19 '23 11:05 ojmocodes

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)

Kettenotter avatar May 24 '23 09:05 Kettenotter

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.

PhocaMachina avatar May 26 '23 21:05 PhocaMachina

@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?)

jamiebrynes7 avatar Jun 01 '23 16:06 jamiebrynes7

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.

LeapingLue avatar Jun 13 '23 05:06 LeapingLue

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.

thesamim avatar Jul 10 '23 15:07 thesamim

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.

CatOtchi avatar Aug 17 '23 11:08 CatOtchi

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...

thesamim avatar Aug 18 '23 16:08 thesamim

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

CatOtchi avatar Aug 19 '23 11:08 CatOtchi

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

DarkCartoons avatar Jan 31 '24 12:01 DarkCartoons