Sentinel2_L2A Download Error

I am trying to download NDVI from the Sentinel2_L2A data collection using the WCSRequest. I have inputted a date and bbox and have created an NDVI layer in the cofiguration utility of sentinelhub. I am receiving an error 400 for it. I am attaching the code and error for better understanding.

wcs_true_color_request = WcsRequest(
    data_collection  = DataCollection.SENTINEL2_L2A,
    data_folder = '/Users/sid/Documents/WATER_STRESS/ET/SENTINEL_PRODUCTS/NDVI',
    layer = 'NDVI',
    bbox = bbox,
    time = date,
    resx = '10m',
    resy = '10m',
    image_format = MimeType.TIFF,
    custom_url_params = {
        CustomUrlParam.SHOWLOGO: False
    },
    config = config
)
wcs_true_color_img = wcs_true_color_request.get_data()  
NDVI = wcs_true_color_img[-1]
NDVI
DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/ogc/wcs/b16113bc-6bb9-464c-a6a6-21c056aeb7da?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&BBOX=30.365748%2C75.661812%2C30.558113%2C75.907974&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-10-01T05%3A40%3A42Z%2F2023-10-01T05%3A40%3A42Z&RESX=10m&RESY=10m&COVERAGE=NDVI&REQUEST=GetCoverage&VERSION=1.1.2
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/wcs/b16113bc-6bb9-464c-a6a6-21c056aeb7da?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&BBOX=30.365748%2C75.661812%2C30.558113%2C75.907974&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-10-01T05%3A40%3A42Z%2F2023-10-01T05%3A40%3A42Z&RESX=10m&RESY=10m&COVERAGE=NDVI&REQUEST=GetCoverage&VERSION=1.1.2
Server response: "Requesting only remote collections is not allowed. At least one requested collection must be hosted by the API endpoint. Please use one of the following endpoints with your request: services-uswest2.sentinel-hub.com."

The error is suggesting I use the services-uswest2.sentinel-hub.com endpoint which an endpoint for USWEST deployments. Sentinel2_L2A comes under the EU deployment which uses ‘https://services.sentinel-hub.com’ endpoint.

Why am i receiving the following error??

Thanks
Sidharrth

Hi,

I was not able to replicate the error that you are receiving. Are you using the instructions from these examples?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.