Postman is a popular API platform that makes it easier for developers to design,
build, test, and collaborate on APIs. In this post, we’ll talk about how to use Postman to test some of the Looker Studio API calls.
Step 1: Enable the API
- Open the Looker Studio API in the Google API Console.
- If prompted, select a project, or create a new one.
- Click Enable.
- If prompted, read and accept the API’s Terms of Service.
Step 2: Create an OAuth Client
-
In the console, select the Configure OAuth tab and click Create.
-
Fill in the required fields and click Save.
-
If you’re testing from Postman’s web application, add the following
redirect URI: https://oauth.pstmn.io/v1/browser-callback. -
If you’re testing from
the Postman desktop application, add this URI:
https://oauth.pstmn.io/v1/callback. -
If you switch between the web and desktop
application during your development workflow, add both URIs.
-
-
Select the Credentials tab and click Create credentials.
-
Select OAuth client ID.
-
When prompted to choose an Application Type, select Web application.
-
Fill in the required fields and click Create.
-
Take note of the Client ID and Client Secret.
Step 3: Authorize with Postman
- In Postman, go to Collections > Authorization and select OAuth 2.0. Enter the
following values:
- Auth URL: https://accounts.google.com/o/oauth2/v2/auth
- Access Token URL: https://oauth2.googleapis.com/token
- Scope: https://www.googleapis.com/auth/datastudio
- Use the client ID and Client Secret that you got from step 2.
- Once you’ve entered this data, click Get New Access Token.
- Google will then prompt you to select an account to authenticate with.
- Back in Postman, you will see a modal with your newly generated access token and other relevant metadata.
- Click Use Token to automatically add the token to the Token field.
Optional: Revoking Postman access
You can visit Third-party apps & services to see a list of all third-party applications that have access to your Google account. You can revoke authorization access to any of these applications by clicking
Remove access. The application in this example is named “Postman x Google.”