Hello Developers and Community Members,
I really need help with a straightforward task that is not running, I hope there are many solid developers and problem solvers who could help me with the problem.
I am actually trying to download USGS Earth explorer Landsat 8 imagery using python libraries.
USGSError: UNAUTHORIZED_USER: Unable to validate user API permissions.
Whereas the code is:
from landsatxplore.api import API
api = API("sabafatima1101", "#Geoinformaticionno1")
scenes = api.search(
dataset='landsat_8_c1',
latitude=33.68,
longitude=73.03,
start_date='2020-8-01',
end_date='2020-10-29',
max_cloud_cover=10
)
IndexError: list index out of range
whereas the code I wrote is;
ee = EarthExplorer("sabafatima1101", "#Geoinformaticionno1")
Anyone who could help me to resolve any error I would be very thankful.
You can send a request to USGS for access controls. Follow the steps below.
It usually takes around a week for the review process, and if things are right, they will give you permission for machine to machine access, which is API calls. This will solve the first error. Not so sure about the second one. I am also facing the same issue.
Found a fix yet?