User Guide Getting Started Help Center Documentation Community Training
Looker API Troubleshooting

This page has troubleshooting procedures for the following problems that people may encounter with the Looker API:

API Endpoint Isn’t Reachable

If you can’t reach an API endpoint, you can verify:

Verify Your API Credentials

If your Looker API endpoint isn’t reachable, the first step is to verify that your API credentials are correct:

  1. In Looker, click on Admin at the top right of the window.
  2. In the left panel of the Admin page, scroll down and click API.
  3. On the API page, click the View API Docs link to open the interactive API Explorer. (See this documentation page for information on the interactive API Explorer.) If the API Explorer does not open, you may need to verify the API port.
  4. In the API Explorer, enter the API3 client ID and client secret. (See this documentation page for information on setting up API3 keys.)
  5. Click Log In.
  6. Scroll down to the User : Manage Users section and click the arrow to expand it.
  7. Click on the me() API call to expand it.
  8. Click the Try it out button.

This should produce a 200 Response Code with a Response body that starts with something like this:

{ "id": 1, "first_name": "Luke", "last_name": "Ahr", "email": "", "is_disabled": false, …

In the API Explorer, it looks something like this:

If you see the expected json output, then your API credentials are working. Try to use these exact credentials to reach your API endpoint. If you still cannot reach the API endpoint using these credentials, next verify that you’re using the correct API URL.

Verify the API URL

Another common problem in reaching an API endpoint is an incorrect API host URL. Most Looker instances use the default URL for the API. However, Looker installations using the alternate API path or Looker installations located behind a load balancer (for example, a cluster configuration) or any other proxy might not use the default URL. If this is the case, the API host URL must indicate the user-facing API host name and port.

Looker admins can see the API host URL in the API admin settings (described in more detail on this documentation page):

  1. Click Admin to open the Admin menu.
  2. Click API in the Admin panel.
  3. View the API Host URL. If the API Host URL field is blank, your Looker instance uses the default format, which is:

You can test the API host URL by doing the following:

  1. Open a browser and open the browser console. (This link might be helpful if you need to know how to open a console for your browser.)
  2. Enter your API host URL in this format: https://<my_company>

If the API host URL is correct, this URL will result in a blank web page, and not an error page:

You can also verify that you’ve reached the API by looking at the network response in the browser console. The network response should be 200:

If these checks fail, the problem may be that you are calling the API incorrectly or that you have other errors in your code. Check your API calls and the code in your script. If those are correct, see the next section about verifying your port.

Verify the API Port

If the above checks fail and you have a customer-hosted Looker deployment, it is possible that the API port needs to be opened on the network infrastructure.

The API port should forward to the Looker server. For customer-hosted Looker deployments, ask your network administrator to check the API port settings. The API port (port 19999 by default) should have the same configuration settings as the Looker instance port (port 9999 by default). Your network administrator should verify that the following settings are the same for the API port as they are for your Looker instance port:

API Calls Hang

If you are able to open the API Explorer, but your API calls hang, verify that your Looker instance’s API Host URL setting is either blank or set correctly. Looker admins can see the API host URL in Looker’s API admin settings (described on this documentation page).

Login Attempts Return 404 Errors

If API login attempts are returning 404 errors, it’s most likely because your API3 client ID or client secret isn’t valid. The API login REST endpoint is one of the following, depending on the API version in use:


If using a Swagger codegen API or a Looker SDK, ensure your base_url value is correct:

Invalid Encoding Errors

If you receive an encoding error when attempting to make an API call, you may need to set the proper Content-Type in your header during the request. HTTP protocol standards require that any POST, PUT, or PATCH request contain a Content-Type header. Since the Looker API uses JSON throughout, the Content-Type header should be set to application/json.

Note that using a Looker SDK will automatically deal with this concern for you.