Downloading Files Using LAADS DAAC Tokens

Users wishing to download via a browser simply need to log in and click links within the LAADS Archive. Scripted downloads will need to use LAADS tokens in order to be properly authorized.

LAADS tokens are alphanumeric string values that identify who you are. Tokens get passed in the Authorization header of each HTTP GET request. See code samples below.

Requesting a Token

Any user that does not already have a token for LAADS DAAC can perform the following steps:

  1. Login by going to Profile -> Earthdata Login
  2. Select Profile -> Generate Token from the top menu
  3. Copy the token from this window and store it somewhere safe and secure
  4. If you lose your token, repeat the steps above to generate a replacement

Retrieving a Token

LAADS does not store previously generated tokens. In the event of a lost token, please generate a new one. Users can generate as many tokens as needed.

How to use a Token

This example uses the curl command to make a request for the file on our web server at the URL https://ladsweb.modaps.eosdis.nasa.gov/PATH_TO_MY_FILE

curl -v -H 'Authorization: Bearer MY_TOKEN' -C - 'https://ladsweb.modaps.eosdis.nasa.gov/PATH_TO_MY_FILE' > result

The example above passes your token via the Authorization HTTP header while utilizing the Bearer schema. When finished, the resulting download will be written to a file called “result” in whatever directory (folder) from which you run the command.

The token located in the header is how LAADS identifies users. If the token is invalid, missing, or an -h is used instead of -H, the curl command will not work. The -v parameter tells curl to be verbose so extra information about the request and response will be printed out. If this extra information is not needed the -v parameter can be left off.

Curl is available for all current operating systems, including Linux, MacOS, and Microsoft Windows.

Note

  1. All characters in the command are important, including dashes, colons, and quotation marks
  2. Copy your token in place of the string MY_TOKEN
  3. Copy the path to the file you need in place of the string PATH_TO_MY_FILE
  4. Most LAADS DAAC file paths look like

    archive/allData/ARCHIVE SET/PRODUCT/YEAR/DAY_OF_YEAR/FILENAME

    An example of an existing file is below.

    https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/6/MOD02QKM/2007/018/MOD02QKM.A2007018.0105.006.2014227230926.hdf

    This path should return a MODIS Terra quarter kilometer (250 m) top of atmosphere reflectance product for year 2007, day-of-year 018 (i.e. January 18), from collection 6.

Last updated: November 9, 2021