Tasks: delete

Requires authorization

Deletes the specified task from the task list. Try it now or see an example.

Request

HTTP request

DELETE https://www.googleapis.com/tasks/v1/lists/tasklist/tasks/task

Parameters

Parameter name Value Description
Path parameters
task string Task identifier.
tasklist string Task list identifier.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/tasks

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.

Examples

Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).

Java

Uses the Java client library.

service.tasks.delete("@default", "taskID").execute();

PHP

Uses the PHP client library.

$service->deleteTasks('@default', 'taskID');

Python

Uses the Python client library.

service.tasks().delete(tasklist='@default', task='taskID').execute()

.NET

Uses the .NET client library.

service.Tasks.Delete("@default", "taskID").Fetch();

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.

Send feedback about...

Tasks API
Tasks API