Migrating from legacy token to NASA EarthData token to download ATL03 from NSIDC
Posted: Thu Jun 01, 2023 6:43 pm America/New_York
Hi there,
I recently discovered that the legacy token that I had been using (and updating every 30 days) has become deprecated. I used that to download ICESat-2 ATL03 programmatically for a certain region and letting the NSIDC do the spatial and temporal subsetting to reduce download volume on my end. It appears that the NASA EarthData token (https://urs.earthdata.nasa.gov/documentation/for_users/user_token) is what I need now. I have two questions regarding this transition:
1. With my NASA EarthData username+password I can create a token through the API (with my base64 credentials), as described in the aforementioned manual. However, I cannot use the described GET method to get one that I have previously created (with my username:password combo). I just get "Invalid credentials" as a response (see attached file). How can I fix this? All I did was copy the command as described in the manual, with the username and password that I used to log in to EarthData (and from which I am posting my question).
2. Once I have that new token, how do I use it to download ICESat-2 ATL03 from the NSIDC, with their subsetting options. What I have been using is the following command: curl -O -J -k --dump-header response-header.txt "https://n5eil02u.ecs.nsidc.org/egi/request?&short_name=ATL03&version=005&token=<my_token>&email=false&bounding_box=3.182,50.696,6.092,53.482&bbox=3.182,50.696,6.092,53.482&coverage=/gt1l/heights/h_ph,/gt1l/heights/lon_ph,/gt1l/heights/lat_ph&page_num=1" (with the token from the legacy method, and a lot more parameters to download). However, when I paste the new token into this command, it does not work. It downloads a response-header.txt file with error code 500 and an error.xml file with "InternalServerError" and "Your request cannot be processed at this time". Does this mean that the issue is on the NSIDC end and that the method of just replacing tokens is correct, or is there more to it?
I recently discovered that the legacy token that I had been using (and updating every 30 days) has become deprecated. I used that to download ICESat-2 ATL03 programmatically for a certain region and letting the NSIDC do the spatial and temporal subsetting to reduce download volume on my end. It appears that the NASA EarthData token (https://urs.earthdata.nasa.gov/documentation/for_users/user_token) is what I need now. I have two questions regarding this transition:
1. With my NASA EarthData username+password I can create a token through the API (with my base64 credentials), as described in the aforementioned manual. However, I cannot use the described GET method to get one that I have previously created (with my username:password combo). I just get "Invalid credentials" as a response (see attached file). How can I fix this? All I did was copy the command as described in the manual, with the username and password that I used to log in to EarthData (and from which I am posting my question).
2. Once I have that new token, how do I use it to download ICESat-2 ATL03 from the NSIDC, with their subsetting options. What I have been using is the following command: curl -O -J -k --dump-header response-header.txt "https://n5eil02u.ecs.nsidc.org/egi/request?&short_name=ATL03&version=005&token=<my_token>&email=false&bounding_box=3.182,50.696,6.092,53.482&bbox=3.182,50.696,6.092,53.482&coverage=/gt1l/heights/h_ph,/gt1l/heights/lon_ph,/gt1l/heights/lat_ph&page_num=1" (with the token from the legacy method, and a lot more parameters to download). However, when I paste the new token into this command, it does not work. It downloads a response-header.txt file with error code 500 and an error.xml file with "InternalServerError" and "Your request cannot be processed at this time". Does this mean that the issue is on the NSIDC end and that the method of just replacing tokens is correct, or is there more to it?