Unchecking the option to allow access to all APIs may sound counterintuitive. We uncheck it here because this setting only gives you access to a specific set of our APIs. Leaving the option checked prevents you from granting your token access to some APIs including the Tasks API.

There, you need to list all the scopes to which your domain OAuth token needs access. In order to set this up do:

In the Client Name field enter your domain name.

In the One or More API Scopes box, enter all the scopes of the APIs you want your token to have access to separated by commas (scopes can usually be found in the authorization section of the Developer's Guide for each API). For example, to give your token access to the Google Calendar API and the Google Tasks API enter the following scopes: https://www.googleapis.com/auth/calendar/, https://www.googleapis.com/auth/tasks

Click the Authorize button. If you entered your scopes correctly, they should appear in the list below next to your domain name with the name of the product associated to the scope.

Get your API key from the APIs Console

You also need the API Key from a project registered on the APIs Console. The API Key allows Google to know which project to deduct quota from, how to handle user-specific quota etc... To get this go to the API Access page of your APIs Console's project: Google APIs Console > API Access > Simple API Access

You might have to create a project if you haven't done so already. Then enable access to the Tasks API for your project by simply toggling the On/Off Tasks API switch to "On" in the All Services page.

Enabling the Google Tasks API for a project in the APIs Console

Using the client libraries

Below are some very basic code samples using our Tasks API client libraries for multiple languages. These code samples show you in Java and Python how to authenticate to the service using 2-LO and run a basic query.

You should now have these four values that are required to authenticate using 2-LO on the Tasks API: