diff --git a/configuration.yaml b/configuration.yaml index c996005..1d3ca95 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -55,7 +55,9 @@ rest_command: todoist: method: post url: 'https://api.todoist.com/sync/v9/{{ url }}' - payload: !secret todoist_api_payload + payload: '{{ payload }}' + headers: + Authorization: !secret todoist_api_token content_type: 'application/x-www-form-urlencoded' downloader: diff --git a/sensors/tasks.yaml b/sensors/tasks.yaml index a5a48a0..ce23385 100644 --- a/sensors/tasks.yaml +++ b/sensors/tasks.yaml @@ -3,8 +3,9 @@ method: GET resource: 'https://api.todoist.com/sync/v9/projects/get_data' params: - token: !secret todoist_api_token project_id: 2285969005 + headers: + Authorization: !secret todoist_api_token value_template: '{{value_json[''project''][''id'']}}' json_attributes: - project @@ -15,8 +16,9 @@ method: GET resource: 'https://api.todoist.com/sync/v9/projects/get_data' params: - token: !secret todoist_api_token project_id: 2285967948 + headers: + Authorization: !secret todoist_api_token value_template: '{{value_json[''project''][''id'']}}' json_attributes: - project