Skip to content

Commit b5e0e85

Browse files
bernikrgrinstantin
authored andcommitted
Change the REST documentation
This accounts for changes in the todoist api, as they do not accept the token as a parameter anymore
1 parent bd1a228 commit b5e0e85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ This card can be configured using Lovelace UI editor.
4242
method: GET
4343
resource: 'https://api.todoist.com/sync/v9/projects/get_data'
4444
params:
45-
token: !secret todoist_api_token
4645
project_id: TODOIST_PROJECT_ID
46+
headers:
47+
Authorization: !secret todoist_api_token
4748
value_template: '{{ value_json[''project''][''id''] }}'
4849
json_attributes:
4950
- project
@@ -54,13 +55,14 @@ This card can be configured using Lovelace UI editor.
5455
todoist:
5556
method: post
5657
url: 'https://api.todoist.com/sync/v9/{{ url }}'
57-
payload: !secret todoist_api_payload
58+
payload: '{{ payload }}'
59+
headers:
60+
Authorization: !secret todoist_api_token
5861
content_type: 'application/x-www-form-urlencoded'
5962
```
6063
2. ... and to `secrets.yaml`:
6164
```yaml
62-
todoist_api_token: TODOIST_API_TOKEN
63-
todoist_api_payload: token=TODOIST_API_TOKEN&{{ payload }}
65+
todoist_api_token: 'Bearer TODOIST_API_TOKEN'
6466
```
6567
3. Replace `TODOIST_API_TOKEN` with your [token](https://todoist.com/prefs/integrations) and `TODOIST_PROJECT_ID` with ID of your selected Todoist project.
6668
> You can get `TODOIST_PROJECT_ID` from project URL, which usually looks like this:

0 commit comments

Comments
 (0)