I need to extract the dates through the Sentinel server. On the Sentinel page there is an example using Curl but I’m having problems: Http Status 500 Internal Server Error and I don’t know how to solve it and i tried to find some solution without success. I already have the token and the problem is not authentication. Here is the sample code for sentinel:
Sentinel link: Where can I get a list of the available imagery dates for a specific area?
curl -X POST 'services.sentinel-hub.com/api/v1/catalog/search' \
-header 'Authorization: Bearer <your access token>' \
-header 'Content-Type: application/json' \
-data-raw '{
    "bbox": [13,45,14,46],
    "datetime": "2019-12-10T00:00:00Z/2020-12-15T00:00:00Z",
    "collections": ["sentinel-1-grd"],
    "limit": 50,
    "distinct": "date"
}'
And here is the Dart code:
 var url = 'http://services.sentinel-hub.com/api/v1/catalog/search';
    Map<String, dynamic> body = {
      "bbox": "[13, 45, 14, 46]",
      "datetime": "2019-12-10T00:00:00Z/2020-12-15T00:00:00Z",
      "collections": ["sentinel-2-l2a"],
      "limit": 50,
      "distinct": "date"
    };
    var response = await http.post(
      url,
      headers: {
        'Authorization': 'Bearer <your access token>',
        'Content-Type': 'application/json',
      },
      body: json.encode(body),
    );
Thanks in advance 🙂
