Skip to content
Last updated

Google Tasks integration

Integrating Google Tasks with Frontegg allows your application to read, create, update, move, and delete tasks and task lists on behalf of your users — all through Frontegg's integration layer (Google Tasks API v1). You can authenticate with either OAuth 2.0 (recommended when connecting on behalf of individual users) or a Google service account with domain-wide delegation (for acting on behalf of Google Workspace users).


Prerequisites

  • A Google account with access to Google Cloud Console
  • A Google Cloud project (you can create one during setup)

Enable the Google Tasks API

Step 1: Open the Google Tasks API in the API library

Go to the Google Tasks API page in the Google Cloud Console. Select your project from the top navigation, then click Enable if the API is not yet enabled. If you see Manage and API Enabled, the API is already active.

Google Tasks API page in Google Cloud Console

Create an OAuth client

Step 2: Go to the Credentials page

In the left sidebar, navigate to APIs & ServicesCredentials. Click Create credentials.

Credentials page with Create credentials button highlighted

Step 3: Select OAuth client ID

From the dropdown, select OAuth client ID.

Create credentials dropdown with OAuth client ID highlighted

Step 4: Configure the OAuth client

On the Create OAuth client ID page:

  1. Set Application type to Web application.
  2. Enter a name for the client (for example, Frontegg Google Tasks Integration).
  3. Under Authorized redirect URIs, click Add URI and add both of the following:
    • https://YOUR_MCP_GATEWAY_URL/integration-callback

Click Create.

OAuth client form with name and redirect URIs filled in

Step 5: Copy your Client ID and Client Secret

After clicking Create, a dialog displays your Client ID and Client Secret — copy both values and store them securely.

Save your Client Secret now

The Client Secret is only shown once in this dialog. After you close it, you cannot retrieve it again — you can only create a new secret.

OAuth client created dialog showing Client ID and blurred Client Secret

Copy your credentials

Step 6: View the new client in the credentials list

After closing the dialog, your new client appears at the top of the OAuth 2.0 Client IDs list on the Credentials page.

Credentials page showing the new Frontegg Google Tasks Integration client

Step 7: View Client ID in the client detail page

Click the client name to open its detail page. You can view and copy the Client ID at any time from the Additional information section.

OAuth client detail page showing Client ID in the Additional information section

Use a service account instead

If you are connecting on behalf of Google Workspace users rather than having each user authorize the OAuth flow, you can use a service account with domain-wide delegation. Frontegg then impersonates a specific Workspace user on every request.

This method requires a Google Workspace administrator.

Step 1: Create a service account and JSON key

In the same Google Cloud project (with the Google Tasks API enabled), go to APIs & ServicesCredentialsCreate credentialsService account. Give it a name and create it. Open the service account, go to the Keys tab, click Add keyCreate new key, choose JSON, and download the key file. Note the service account's Client ID (a numeric ID under its Details), which you need for the next step.

Step 2: Grant domain-wide delegation for the Tasks scope

In the Google Workspace Admin console, go to SecurityAccess and data controlAPI controlsDomain-wide delegation. Click Add new, enter the service account's numeric Client ID, and add the scope the integration needs:

  • https://www.googleapis.com/auth/tasks for read and write access, or
  • https://www.googleapis.com/auth/tasks.readonly for read-only access.

Click Authorize.

Keep your service account key safe

The JSON key grants access to your account through the API. Treat it like a password and never expose it in client-side code or commit it to version control.

Configure the Frontegg portal

Configure the integration in the Frontegg portal using the method you chose:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Google Tasks.
  2. For OAuth, enter the Client ID and Client Secret. For a service account, paste the full JSON key into the Service Account JSON field and enter the Workspace user to act on behalf of in the User to impersonate field instead.
  3. Select the required scopes:
ScopeDescription
https://www.googleapis.com/auth/tasks.readonlyRead-only access to Google Tasks
https://www.googleapis.com/auth/tasksRead and write access to Google Tasks
  1. Click Save.

Keep your credentials secure

Never share or commit your Client Secret to version control.

Additional resources