Stay organized with collections
Save and categorize content based on your preferences.
The Looker Studio API allows you to search for and manage Looker Studio assets.
The primary use case for the API is to allow Google Workspace or Cloud Identity
organizations to automate management and migration of Looker Studio assets.
Requirements overview
The following steps are required to use the Looker Studio API:
The steps above may be performed by the same or different organizations based on
the following common scenarios:
Internal apps developed for an organization. The organization configures
and authorizes the app for all users of their organization.
3rd-party apps developed for external users/customers (i.e. developer
and users belong to different organizations). The developer configures the
app but the user's organization authorizes the 3rd-party app.
Choose the appropriate Application Type. (Web application is most
common).
Fill required fields, click Create.
Take note of the Client ID since it is used to authorize the app.
2. Authorize the app for an organization
Apps using the Looker Studio API can only authenticate and authorize Google
Workspace users where the user's organization has authorized the app using
Domain-wide delegation to control API access.
Configure domain-wide delegation with the OAuth Client ID of the app and
the Scopes required by the app.
Enter the Client ID of the app to authorize (i.e. the app that uses the
Looker Studio API).
Enter all OAuth scopes required by the app. The following scopes are
commonly requested if using the Looker Studio API to manage assets:
https://www.googleapis.com/auth/datastudio
https://www.googleapis.com/auth/userinfo.profile
Click Authorize.
After authorizing the app, any Workspace user belonging to the organization will
automatically be authorized to use the app with the Looker Studio API.
3. Obtaining OAuth 2.0 access tokens and calling the API
Once you have developed and authorized the app you will have the necessary
access to call the API for Workspace users. See
Using OAuth 2.0 to Access Google APIs for details on working with Google APIs
using OAuth. Refer to the API reference for available operations.
Troubleshooting
Missing OAuth dialog
If a user's organization has authorized the app, users of that organization
will not be shown the OAuth dialog when authorizing the app. The only exception
would be if the app requests authorization for additional Google API scopes that
the Workspace Admin hasn't configured, in which case the OAuth dialog will be
shown to users.
Error 400: invalid_scope
If a user receives an Error 400: invalid_scope message when attempting to
authorize the app, then the user's organization has not or incorrectly
authorized the app. To resolve the issue, the user will have to request that
their organization authorize the app.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe Looker Studio API enables programmatic management of Looker Studio assets, primarily for automation and migration within Google Workspace or Cloud Identity organizations.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, you must configure an app, authorize it via the Google Admin console (requiring domain-wide delegation), and then obtain OAuth 2.0 access tokens for API calls.\u003c/p\u003e\n"],["\u003cp\u003eThe API is exclusively available to users within organizations that have Google Workspace or Cloud Identity.\u003c/p\u003e\n"],["\u003cp\u003eWhen a Workspace admin authorizes an app with the necessary scopes, users in that organization are automatically authorized to use the app with the Looker Studio API.\u003c/p\u003e\n"],["\u003cp\u003eCommon troubleshooting issues include a missing OAuth dialog (expected behavior if the app is authorized) and "Error 400: invalid_scope" indicating the app hasn't been authorized by the user's organization.\u003c/p\u003e\n"]]],[],null,["# Looker Studio API\n\nThe Looker Studio API allows you to search for and manage Looker Studio assets.\n\nThe primary use case for the API is to allow Google Workspace or Cloud Identity\norganizations to automate management and migration of Looker Studio assets.\n| **Key Point:** The API is only available to users that belong to an organization with Google Workspace or Cloud Identity.\n\nRequirements overview\n---------------------\n\nThe following steps are required to use the Looker Studio API:\n\n1. [Configure an app to use the API](#configure-app).\n2. [Use the Google Admin console to authorize the app](#authorize-app).\n3. [Obtain OAuth 2.0 access tokens and call the API](#calling-api).\n\nThe steps above may be performed by the same or different organizations based on\nthe following common scenarios:\n\n- **Internal apps** developed for an organization. The organization configures and authorizes the app for all users of their organization.\n- **3rd-party apps** developed for external users/customers (i.e. developer and users belong to different organizations). The developer configures the app but the user's organization authorizes the 3rd-party app.\n\n1. Configure an app to use the API\n----------------------------------\n\nComplete the following to configure your app:\n\n- [Enable the API](#enable_the_api)\n- [Create an OAuth client](#create_an_oauth_client)\n\n#### Enable the API\n\nTo enable an API for your project:\n\n1. Open the [Looker Studio API](https://console.cloud.google.com/apis/library/datastudio.googleapis.com) in the Google API Console.\n2. If prompted, select a project, or create a new one.\n3. Click **Enable**.\n4. If prompted, read and accept the API's Terms of Service.\n\n#### Create an OAuth Client\n\nThe following steps to create an OAuth Client are general guidelines and should\nbe adjusted to meet your app requirements.\n| **Important:** Don't add Looker Studio scopes to your OAuth Client. The scopes will be added by the Workspace admin when they authorize the app.\n\n1. Navigate to [Configure OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent).\n 1. Choose **Internal** , click **Create**.\n 2. Fill out required fields, click **Save**.\n2. Navigate to [Credentials](https://console.cloud.google.com/apis/credentials).\n 1. Click **CREATE CREDENTIALS**.\n 2. Select **OAuth client ID**.\n 3. Choose the appropriate `Application Type`. (Web application is most common).\n 4. Fill required fields, click **Create**.\n3. Take note of the **Client ID** since it is used to authorize the app.\n\n2. Authorize the app for an organization\n----------------------------------------\n\nApps using the Looker Studio API can only authenticate and authorize Google\nWorkspace users where the user's organization has authorized the app using\n[Domain-wide delegation to control API access](https://support.google.com/a/answer/162106).\n\nConfigure *domain-wide delegation* with the OAuth **Client ID** of the app and\nthe **Scopes** required by the app.\n| **Important:** The following steps must be completed by a Workspace admin. The admin will need the **OAuth Client ID** of the app and a list of **OAuth Scopes** required by the app.\n\n1. Sign in to your Google Admin console and navigate to [domain wide delegation](https://admin.google.com/ac/owl/domainwidedelegation).\n2. In `API clients`, click **Add new**.\n3. Enter the `Client ID` of the app to authorize (i.e. the app that uses the Looker Studio API).\n4. Enter **all** OAuth scopes required by the app. The following scopes are commonly requested if using the Looker Studio API to manage assets:\n - `https://www.googleapis.com/auth/datastudio`\n - `https://www.googleapis.com/auth/userinfo.profile`\n5. Click **Authorize**.\n\n| **Note:** If your app doesn't need to manage Looker Studio assets, consider using the more restrictive `https://www.googleapis.com/auth/datastudio.readonly` scope instead of `https://www.googleapis.com/auth/datastudio`.\n\nAfter authorizing the app, any Workspace user belonging to the organization will\nautomatically be authorized to use the app with the Looker Studio API.\n\n3. Obtaining OAuth 2.0 access tokens and calling the API\n--------------------------------------------------------\n\nOnce you have developed and authorized the app you will have the necessary\naccess to call the API for Workspace users. See\n[Using OAuth 2.0 to Access Google APIs](/identity/protocols/OAuth2) for details on working with Google APIs\nusing OAuth. Refer to the [API reference](/looker-studio/integrate/api/reference) for available operations.\n\nTroubleshooting\n---------------\n\n### Missing OAuth dialog\n\nIf a user's organization has [authorized the app](#authorize-app), users of that organization\nwill not be shown the OAuth dialog when authorizing the app. The only exception\nwould be if the app requests authorization for additional Google API scopes that\nthe Workspace Admin hasn't configured, in which case the OAuth dialog will be\nshown to users.\n\n### Error 400: invalid_scope\n\nIf a user receives an `Error 400: invalid_scope` message when attempting to\nauthorize the app, then the user's organization has not or incorrectly\n[authorized the app](#authorize-app). To resolve the issue, the user will have to request that\ntheir organization authorize the app."]]