Login Stay organized with collections Save and categorize content based on your preferences.
Present client credentials to obtain an authorization token
Looker API implements the OAuth2Resource Owner Password Credentials Grant pattern.The client credentials required for this login must be obtained by creating an API key on a user accountin the Looker Admin console. The API key consists of a publicclient_id and a privateclient_secret.
The access token returned bylogin must be used in the HTTP Authorization header of subsequentAPI requests, like this:
Authorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4Replace "4QDkCy..." with theaccess_token value returned bylogin.The wordtoken is a string literal and must be included exactly as shown.
This function can acceptclient_id andclient_secret parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params.
Example of passing credentials in the HTTP request body:
POST HTTP /loginContent-Type: application/x-www-form-urlencodedclient_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvvBest Practice:
Always pass credentials in body params. Pass credentials in URL query paramsonly when you cannot pass body params due to application, tool, or other limitations.
For more information and detailed examples of Looker API authorization, seeHow to Authenticate to Looker API.
Request
Response
200: Access token with metadata.
400: Bad Request
404: Not Found
429: Too Many Requests
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-09 UTC.