Create a Looker API Connection

White Label Data allows you to use the Looker API to query Looker models and map dimensions and metrics to native White Label Data visualizations. In order to use the Looker API to query your Looker instance, you must set up a connection to Looker in White Label Data. Before you can create the connection, you need to create a user account in Looker that will be the service account used by White Label Data. The service account is a regular user that you have restricted with only the permissions necessary by the app and that has API3 credentials. It is recommended that this user be given read-only access to only the required Looker models.

You can find the full documentation for creating Looker users here. Once you have created the user and given the account access to the Looker models you will be using, you also have to create an API3 key for that user. Make note of the key that you create as you will be storing it in an environment variable.

Example appconfig.json:

 "connections" : [
            "type" : "looker_api",
            "host" : "",
            "client_id" : "AjWbt61PpxoyZQpJwjQj",
            "allowed_models" : ["mymodel"],
            "env_var" : "LOOKER_API_SECRET"
Option Example Description
host "" DNS name of your Looker instance.
client_id "AjWbt61PpxoyZQpJwjQj" Client ID for Looker API3 user. Follow these guidelines to create API3 credentials in Looker:
allowed_models [ "mylookermodel", "myothermodel" ] List of allowed Looker models. This options serves as an extra level of security that limits the Looker models the specified API user can interact with.
env_var "LOOKER_API_SECRET" The name of the environment variable that will hold API3 key for the user.

Note: You must also add this environment variable to your environment settings for your instance. See “Adding connection environment variables to your local development environment” here.