Skip to content
getgeolens.com

Login

POST
/auth/login
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=example

Authenticate 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.

X-GeoLens-Auth-Mode
Any of:
string

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.

Media type application/x-www-form-urlencoded
Body_login_auth_login_post
object
grant_type
Any of:
string
/^password$/
username
required
Username
string
password
required
Password
string format: password
scope
Scope
string
""
client_id
Any of:
string
client_secret
Any of:
string

Successful Response

Media type application/json
TokenResponse
object
access_token
required
Access Token

JWT access token for Authorization header

string
refresh_token
required
Any of:
string
token_type
Token Type
string
default: bearer
expires_in
required
Expires In

Seconds until the access token expires

integer
Example
{
"token_type": "bearer"
}

Bad request — invalid query parameters or payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}