1

New version of Google Tasks has a time component on due date and a way to set repetitive tasks. I have added a picture below.

Can Google Tasks API be used to capture time?

If I use time component in the tasks API due field, tasks API is automatically turning the time component to 00:00

let headers = new HttpHeaders()
        .set('Content-Type', 'application/json; charset=UTF-8')
        .set('Authorization', 'Bearer '+ self._accessToken);
let body = {
     'title': 'Hello world',
     'notes': 'random task notes',
     'due': '2019-03-27T09:45:00Z'
  };

return self.http.post('https://www.googleapis.com/tasks/v1/lists/@default/tasks', body, {headers: headers});
  • You can vote on Google's public issue tracker to make this data accessible via the API. The issue is here: https://issuetracker.google.com/issues/128979662 . You can vote on the issue if you are affected by it. – zr0gravity7 Dec 19 '21 at 18:11

1 Answers1

1

Per the docs,

It isn't possible to read or write the time that a task is due via the API.

https://developers.google.com/tasks/v1/reference/tasks#resource

fischgeek
  • 688
  • 1
  • 5
  • 18