Create Download Token Endpoint
POST
/auth/download-token/{dataset_id}
const url = 'https://example.com/api/auth/download-token/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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/api/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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” dataset_id
required
Dataset Id
string format: uuid
Responses
Section titled “ Responses ”Successful Response
Media type application/json
DownloadTokenResponse
object
token
required
Token
Short-lived download-scoped JWT (typ=‘download’, TTL ≤ 120s)
string
expires_in
Expires In
Seconds until the download token expires
integer
Example
{ "expires_in": 120}Bad request — invalid query parameters or payload
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Forbidden — caller lacks access to this resource
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Not found
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Validation error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Internal server error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}