Skip to content

Planetary Computer API issuing pre-expired tokens #463

@drmika

Description

@drmika

Yesterday while trying to download data from the Planetary Computer using dask, I encountered an issue where the API is issuing tokens for the correct start TIME, but for the incorrect start DATE (the start date is exactly 1 -day prior). This renders the tokens expired because I can even use them.

Here is a snippet of output from a debugging I did. I instructed the code to pull a fresh url from the API for batch each time and print out the token start time. The time, for example 2025-11-19 22:40:33Z is off by exactly one day and so when the code tries to compute on that already-expired URL it fails. In summary, the API was assigning the token to Nov 19 but this code was run on Nov 20.

Data Found Fetching fresh items from API for batch... DEBUG: Token start time = 2025-11-19T22%3A40%3A33Z DEBUG: Current time = 2025-11-20 22:42:24.229570 UTC DEBUG: Token expired? True Fetching fresh items from API for batch... DEBUG: Token start time = 2025-11-19T22%3A40%3A33Z DEBUG: Current time = 2025-11-20 22:43:23.053583 UTC DEBUG: Token expired? True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions