Login
const url = 'https://example.com/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'example', username: 'example', password: 'example', scope: '', client_id: 'example', client_secret: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/auth/login \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=example \ --data username=example \ --data password=example \ --data scope= \ --data client_id=example \ --data client_secret=exampleAuthenticate with username and password, receive a JWT token.
GH-1302: a caller sending X-GeoLens-Auth-Mode: cookie receives the
refresh token as an httpOnly cookie and a null refresh_token in the
body. Without that header the response is unchanged, which is what keeps
the CLI, the generated SDKs, Postman, and CI logins working.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Browser session-transport negotiation. Send cookie to carry the refresh token in an httpOnly geolens_refresh cookie, paired with a script-readable geolens_csrf cookie, and receive a null refresh_token in the response body. When the header is absent (the default) the refresh token is returned in the response body, which is the contract every non-browser caller uses.
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Bad request — invalid query parameters or payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks access to this resource
Not found
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request