Search API Connector Documentation

Print

Import Taboola Data to Google Sheets

In this guide, we’ll walk through how to import Taboola data directly into Google Sheets, using the API Connector add-on for Sheets.

Taboola only allows the standard authorization code OAuth flow in special cases (info), so for this guide, we'll use the OAuth client credentials flow instead. That means we'll get our token through some custom API requests rather than through API Connector's automatic OAuth2 connection manager. We'll go through this step by step below.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get a Client ID and Secret

To begin, you'll need to ask your Taboola account manager for a client ID and secret.

Once you have these credentials, move on to part 2.

Part 2: Get Your Access Token

To get your access token, open Google Sheets, click Extensions > API Connector > Open > Create request, and set up a request as follows:

  • Application: Custom
  • Method: POST
  • Request URL: https://backstage.taboola.com/backstage/oauth/token
  • Request body: {"grant_type":"client_credentials", "client_id":"your_client_id", "client_secret":"your_client_secret"}

Substitute in your client ID and secret from above. Name your request and click Run. The whole thing should look like this:

Note the value returned in the access_token field. This is the token you'll use in the next section.

Part 3: Get Taboola Data in Sheets

You can create a request using any of the endpoints and parameters described in Taboola's documentation.

Example #1

This request shows how to fetch your account ID, which you'll need for subsequent requests. Substitute in your own access token where it says your_token.

  • Application: Custom
  • Method: GET
  • Request URL: https://backstage.taboola.com/backstage/api/1.0/users/current/account
  • Headers
    • Authorization: Bearer your_token
    • Content-Type: application/json

Example #2

You can use the same setup to fetch data from any part of Taboola's API, by changing the request URL as shown in their documentation. For example, if you'd like to fetch a campaign summary, a request might look like this. Substitute in your own account ID where it says your_account_id.

  • Application: Custom
  • Method: GET
  • Request URL: https://backstage.taboola.com/backstage/api/1.0/your_account_id/reports/campaign-summary/dimensions/day?start_date=2023-06-01&end_date=2023-06-30
  • Headers
    • Authorization: Bearer your_token
    • Content-Type: application/json
The above request uses the "day" dimension, meaning data is broken down by date. See here for the full list of available dimensions.

Part 4: API Documentation

Official documentation: https://developers.taboola.com/backstage-api/reference/welcome

Leave a Comment

Jump To