Downloading Files Using LAADS DAAC Tokens
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:
- Login by going to Profile -> Earthdata Login
- Select Profile -> Generate Token from the top menu
- Copy the token from this window and store it somewhere safe and secure
- 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/
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.
- All characters in the command are important, including dashes, colons, and quotation marks
- Copy your token in place of the string
- Copy the path to the file you need in place of the string
- Most LAADS DAAC file paths look like
An example of an existing file is below.
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