Hello community,
I am trying to subscribe to the soil water content data using the Sentinel Hub API. However, when I confirm the subscription, I encounter an error:
{
"error": {
"status": 500,
"reason": "Internal Server Error",
"message": "Error occurred while accessing Planet",
"code": "DATA_PROVIDER_ERROR",
"errors": {
"providerError": {
"status": 403,
"content": "{\"error\":{\"reason\":\"Policy issue\",\"details\":[\"No valid line items found for organization_id 'XXXXXX' and resource_id 'SWC-AMSR2-C_V1.0_100'.\"]}}"
}
}
}
}
the error suggest that organization id and resource is are invalid, but I have checked and they seem to be correct.
This is how I have structured the create subscription request(which works perfectly) following the documentation(planetary variable examples):
const data = {
name: 'Soil water content',
input: {
planetApiKey: '...',
provider: 'PLANET',
bounds: {
geometry: {
type: 'Polygon',
coordinates: [
[
[
12.521667,
41.866157
],
...
]
],
},
},
data: [
{
dataFilter: {
timeRange: {
from: '2023-09-22T00:00:00Z',
to: '2023-12-22T23:59:59Z',
},
maxCloudCoverage: 5,
},
type: "soil_water_content",
id: "SWC-AMSR2-C_V1.0_100"
},
],
},
}
and this is the confirm subscription request(which brings the error) based on the returned id from the created subscription above:
const confirmSubscription = async (accessToken, subscriptionId) => {
const url = `https://services.sentinel-hub.com/api/v1/dataimport/subscriptions/${subscriptionId}/confirm`
const options = {
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
const response = await axios.post(url, {}, options)
}
@chung.horng , @msterk and other community members, could you please help me understand what might be causing this issue and how I can resolve it?
Thanks