Skip to content
getgeolens.com

Create Download Token Endpoint

POST
/auth/download-token/{dataset_id}
curl --request POST \
--url https://example.com/auth/download-token/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Mint a short-lived download-scoped JWT for a single dataset.

IA-P0-01 / SEC-04: the existing COG download URL path requires a typ='download' JWT on the ?token= query parameter — session JWTs are rejected. This endpoint issues that token after verifying the caller has read access to the dataset.

Anonymous callers are allowed for public datasets. The returned token has typ='download', scope='dataset:{dataset_id}', and a TTL of 120s.

dataset_id
required
Dataset Id
string format: uuid

Successful Response

Media type application/json
DownloadTokenResponse
object
expires_in
Expires In

Seconds until the download token expires

integer
default: 120
token
required
Token

Short-lived download-scoped JWT (typ=‘download’, TTL ≤ 120s)

string
Example
{
"expires_in": 120
}

Bad request — invalid query parameters or payload

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}

Not found

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}

Validation error

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}

Internal server error

ProblemDetail
object
detail
required
Detail
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
Example
{
"type": "about:blank"
}