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?
URS API calls
Re: URS API calls
Operator error. I had the wrong URL. Instead of https://urs.earthdata.nasa.gov/api/users/uid=<my_own_uid>, it should have been https://urs.earthdata.nasa.gov/api/users/<my_own_uid>.