Martynas-S / polybar-todoist

A polybar module to show the number of uncompleted todoist tasks
0 stars 0 forks source link

Can't authorize using API token #1

Closed aadilayub closed 3 years ago

aadilayub commented 3 years ago
/.config/polybar took 25s
❯ python ~/.config/polybar/todoist/auth.py
Paste the value of the API token from todoist settings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The pasted API code does not work; the user was not authenticated

where xxxx is my todoist api token

I'm not sure why it isn't working. Tried this multiple times. I even issued a new API token when it didn't work the first 2-3 times

Martynas-S commented 3 years ago

Hey,

Not sure why it's not working for you, I've tried with todoist-python-8.1.2 and it seems to work fine without any issues for me. Maybe you should try to debug by seeing what state is returned in the api variable in the test_api_token function after the call to api.sync() is made. Maybe there would be an indication of what error is causing the issue there.

aadilayub commented 3 years ago

Ah, my bad, I was using todoist-python-7.0.18 since that's what the instructions said. Using the latest version fixed the auth issue.

It's showing 0 tasks though, even though I know I have 4 tasks scheduled for today.

~/.config/polybar
❯ python todoist/todo.py
 0
Martynas-S commented 3 years ago

I've merged in some changes into master, which should fix the issue you are having.

aadilayub commented 3 years ago

Wonderful! Thank you :pray: