Todoist frontend cards and configured sensors stopped working after previously working

I woke up yesterday to my lovelace todoist cards showing nothing on them after previously having them fully functional for weeks. i followed the configuration on the github page to setup the sensors and rest command for posting.
Here is my config that i haven’t changed between the sensors being functional and not

sensor:
  - platform: rest
    name: To-do List
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      token: !secret todoist_api_token
      project_id: TODOIST_PROJECT_ID
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
    scan_interval: 30
    
  - platform: rest
    name: Home Maintenance
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      token: !secret todoist_api_token
      project_id: TODOIST_PROJECT_ID
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
    scan_interval: 30
    
  - platform: rest
    name: Shopping List
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      token: !secret todoist_api_token
      project_id: TODOIST_PROJECT_ID
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
    scan_interval: 30

and

  todoist:
    method: post
    url: 'https://api.todoist.com/sync/v9/{{ url }}'
    payload: token=token=TODOIST_API_TOKEN&{{ payload }}
    content_type: 'application/x-www-form-urlencoded'

and here is my error

Logger: homeassistant.components.rest_command
Source: components/rest_command/__init__.py:137
Integration: RESTful Command (documentation, issues)
First occurred: 8:02:19 AM (1 occurrences)
Last logged: 8:02:19 AM

Error. Url: https://api.todoist.com/sync/v9/sync. Status code 403. Payload: b'token=TOKEN&commands=[{"type":"item_add","temp_id":"71-1671890538412-412","uuid":"71-1671890538412-412","args":{"project_id":"unknown","content":"test"}}]'

After looking on the history for the sensor sensor.home_maintenance it was reporting a project # and then randomly yesterday in the AM it has switched to unknown and has not switched back.

I’m currious if anyone else has ran into this problem recently or some next troubleshooting steps because i’m out of my depth.

Thanks

FYI your token is in the error message. You should invalidate that token so no one else can get access to your TODO list.

403 error means “Forbidden”, which suggests that there’s something wrong with the token?

Removed token form comment and updated. Thanks for the heads up!

I will see if a the new token fixes things. Is there an easy way for me to issue rest commands so i can see what is getting sent back from the get command?

Using a new token i’m still getting the same errors.

Same situation here. It was working fine, and just couple of days back, the sensor is in “unknown” state, doesn’t have any attributes (tasks), which means the frontend shows “no uncompleted tasks”. I see 2 issues here:
1/ Frontend showing “no uncompleted tasks” when sensor is in “unknown” state. In this case, it should show “error”, so it doesn’t misleadingly show that you did all you had planned.
2/ The “unknown” state itself. I’m not sure about this, but I think API or something changed, because at the same time HA integration stopped working, synchronization from Todoist windows app stopped working too. I had to go to their site and download new windows client, which fixed that. So probably something has to be updated in the integration too.

So i followed the todoist api documentation for how to sync and used postman to see what i was getting back from my 403 error

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>

<HEAD>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
	<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD>

<BODY>
	<H1>403 ERROR</H1>
	<H2>The request could not be satisfied.</H2>
	<HR noshade size="1px">
	Bad request.
	We can't connect to the server for this app or website at this time. There might be too much traffic or a
	configuration error. Try again later, or contact the app or website owner.
	<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
	<BR clear="all">
	<HR noshade size="1px">
	<PRE>
Generated by cloudfront (CloudFront)
Request ID: PClo4KtErFkNPmc2Vmeu7ki56lwq9hCOH0j3UdtQ82Gr8CZ4K7XsRA==
</PRE>
	<ADDRESS>
	</ADDRESS>
</BODY>

</HTML>

So i’m still getting the error when issuing the GET from another service (postman). I’m have pretty much maxed out what i’m capable of doing troubleshooting wise. I have done some education on REST and whatnot and this is as for as the road goes for me. There is obviously something wrong with how we are accessing the API and i don’t know how to diagnose it.

Calling Todoist API from postman works for me and I’m able to get task list - using the same token I have in HA. However, the HA integration still doesn’t work.

can you share your postman setup?

They fixed it. Update Todoist card via HACS, an then update configuration.yaml according to GitHub - grinstantin/todoist-card: Todoist card for Home Assistant Lovelace UI.