URS API calls
Posted: Wed Aug 23, 2023 9:31 am America/New_York
I can't seem to get a sensible response in using the URS API to search for a user by UID. I'm using curl like this:
curl --request GET --url https://urs.earthdata.nasa.gov/api/users/uid=<my_own_uid> --header 'Authorization: Bearer <my_own_token>'
The response I get is an HTML redirect to https://urs.earthdata.nasa.gov/home.
What I expected was JSON, not HTML, and not to be redirected since I am already logged into URS - it's where I copied the token from. What am I doing wrong?
curl --request GET --url https://urs.earthdata.nasa.gov/api/users/uid=<my_own_uid> --header 'Authorization: Bearer <my_own_token>'
The response I get is an HTML redirect to https://urs.earthdata.nasa.gov/home.
What I expected was JSON, not HTML, and not to be redirected since I am already logged into URS - it's where I copied the token from. What am I doing wrong?