## 事象
#2022/12/22 頃から[[Todoist Sync API]]が以下のようなエラーを返すようになった。
```json
{"error":"Invalid CSRF token","error_code":410,"error_extra":{"access_type":"web_session","event_id":"15457b60252f4b948d5234190d955ac7","retry_after":5},"error_tag":"AUTH_INVALID_CSRF_TOKEN","http_code":403}
```
## 原因
APIの認証方法が古かった。`/sync`のbodyに`{token: トークン}`という形で[[Todoist API token]]を送っていた。
## 解決方法
[[Bearer認証]]を使って、[[Todoist API token]]を[[Bearerトークン]]として送る。
## 参考
- [Overview – Sync API Reference \| Todoist Developer](https://developer.todoist.com/sync/v9/#overview)