1

I'm having issues with the Copernicus Open Access API when it comes to authentication.

If I put e.g. https://scihub.copernicus.eu/dhus/odata/v1/Products('2b17b57d-fff4-4645-b539-91f305c27c69')" in my browser I get a HTTP Basic login form and when I enter my data I get a valid response (i.e. I'm authenticated successfully).

The documentation states that I can also use curl. But when I execute curl -u {username}:{password} "https://scihub.copernicus.eu/dhus/odata/v1/Products('2b17b57d-fff4-4645-b539-91f305c27c69')" I get a 401 Not authorized error. The same problem persists with the Java library I'm using to query results.

Now if I explicitly set the authorization header in curl like curl -H "Authorization: Basic {base64encodedUsernameAndPassword}" "https://scihub.copernicus.eu/dhus/odata/v1/Products('2b17b57d-fff4-4645-b539-91f305c27c69')" everything works but this approach seems like a hack and I cannot apply it to the Java library without forking.

Is there something I'm missing here? Why it doesn't accept the -u parameters?

0

1 Answer 1

1

Just found it out myself. There is a known issue with some special characters in passwords: https://scihub.copernicus.eu/userguide/1SelfRegistration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.