OAuth2 client-credentials token
const url = 'https://api.satellitedata.net/oauth/token';const options = { method: 'POST', headers: { Authorization: 'Basic <credentials>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ grant_type: 'client_credentials', client_id: 'cli_9Pw4Zt6Cx2Lb', client_secret: 'sdn_Vb7Qx2mN8pL4kR6tY1wZ3cF5hJ9aS0dG7eU2iO4q', scope: 'data' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.satellitedata.net/oauth/token \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=client_credentials \ --data client_id=cli_9Pw4Zt6Cx2Lb \ --data client_secret=sdn_Vb7Qx2mN8pL4kR6tY1wZ3cF5hJ9aS0dG7eU2iO4q \ --data scope=dataIssues a one-hour JWT bearer token for the OAuth 2.0 client-credentials grant, so Sentinel Hub style clients such as sentinelhub-py and oauthlib can authenticate unchanged. The client id and API key secret go in HTTP Basic or in the form body. Tokens carry the data scope by default. A request with grant_type urn:satellitedata:params:oauth:grant-type:guest and no client authentication returns a one-hour guest token worth 100 units, valid only on tiles and previews; the website requests it for signed-out visitors, and issuance is capped at 3 per IP per day.
Example values only. Keys shown as sdn_... in this operation are illustrations from the design, not real keys. Lean v1 keys are API Gateway keys issued by the service owner and have no sdn_ prefix.
Authorizations
Section titled “Authorizations”- ClientBasic
- None
Request Bodyrequired
Section titled “Request Bodyrequired”Form-encoded token request.
OAuth 2.0 token request: the client-credentials grant (RFC 6749 section 4.4) or the website guest grant.
object
Client_credentials for API clients; urn:satellitedata:params:oauth:grant-type:guest for a one-hour, 100-unit guest token with no client authentication.
Client id, unless sent with HTTP Basic.
API key secret, unless sent with HTTP Basic.
Space-separated scopes; default data.
Example
grant_type=client_credentials&client_id=cli_9Pw4Zt6Cx2Lb&client_secret=sdn_Vb7Qx2mN8pL4kR6tY1wZ3cF5hJ9aS0dG7eU2iO4q&scope=dataResponses
Section titled “Responses”Token issued.
OAuth 2.0 token response.
object
JWT access token.
Always Bearer.
Lifetime in seconds.
Granted scopes.
Example
{ "access_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6IjIwMjYtMTAifQ.eyJzdWIiOiJhY2N0XzNGejhLcTFXbjUifQ.c2lnbmF0dXJl", "token_type": "Bearer", "expires_in": 3600, "scope": "data"}Headers
Section titled “Headers”Request id for support and logs.
Example
01JQ7Z3M8R5V2W6X9Y0A1B2C3DCaching policy for CloudFront and browsers.
Example
public, max-age=3600, s-maxage=2592000, stale-if-error=604800Unsupported grant type or malformed form.
RFC 9457 problem details. Every 4xx and 5xx response uses this shape with media type application/problem+json. The type URL opens a documentation page that explains the cause and the fix.
object
URL of the documentation page for this problem type, stable for the life of /v1.
Short summary of the problem type. It does not change between occurrences.
HTTP status code, repeated for clients that lose the status line.
Explanation specific to this occurrence, written for a developer.
Path of the request that failed.
Machine-readable problem code; equals the last path segment of type.
Request id, also sent in X-Request-Id. Quote it in support requests.
Field-level validation failures, present on 400 and 422.
One field-level failure.
object
JSON Pointer (RFC 6901) into the request body, or the query parameter name.
What is wrong with that member.
Seconds until the request can succeed; equals the Retry-After header.
The limit that was hit and the value requested, for example maxWidth and requestedWidth.
object
Units the request would have cost, computed before execution.
OAuth 2.0 error code (RFC 6749 section 5.2). Present only on /oauth/token responses.
OAuth 2.0 error description. Present only on /oauth/token responses.
Copy of detail for openEO clients, which read message. Present only on /v1/openeo routes.
Example
{ "type": "https://docs.satellitedata.net/problems/invalid-token-request", "title": "Invalid token request", "status": 400, "detail": "grant_type must be client_credentials.", "instance": "/oauth/token", "code": "invalid-token-request", "requestId": "01JQ7Z3M8R5V2W6X9Y0A1B2C3D", "error": "unsupported_grant_type", "error_description": "grant_type must be client_credentials"}Headers
Section titled “Headers”Request id for support and logs.
Example
01JQ7Z3M8R5V2W6X9Y0A1B2C3DUnknown client or wrong secret.
RFC 9457 problem details. Every 4xx and 5xx response uses this shape with media type application/problem+json. The type URL opens a documentation page that explains the cause and the fix.
object
URL of the documentation page for this problem type, stable for the life of /v1.
Short summary of the problem type. It does not change between occurrences.
HTTP status code, repeated for clients that lose the status line.
Explanation specific to this occurrence, written for a developer.
Path of the request that failed.
Machine-readable problem code; equals the last path segment of type.
Request id, also sent in X-Request-Id. Quote it in support requests.
Field-level validation failures, present on 400 and 422.
One field-level failure.
object
JSON Pointer (RFC 6901) into the request body, or the query parameter name.
What is wrong with that member.
Seconds until the request can succeed; equals the Retry-After header.
The limit that was hit and the value requested, for example maxWidth and requestedWidth.
object
Units the request would have cost, computed before execution.
OAuth 2.0 error code (RFC 6749 section 5.2). Present only on /oauth/token responses.
OAuth 2.0 error description. Present only on /oauth/token responses.
Copy of detail for openEO clients, which read message. Present only on /v1/openeo routes.
Example
{ "type": "https://docs.satellitedata.net/problems/invalid-client", "title": "Invalid client", "status": 401, "detail": "Client authentication failed.", "instance": "/oauth/token", "code": "invalid-client", "requestId": "01JQ7Z3M8R5V2W6X9Y0A1B2C3D", "error": "invalid_client", "error_description": "Client authentication failed"}Headers
Section titled “Headers”Request id for support and logs.
Example
01JQ7Z3M8R5V2W6X9Y0A1B2C3DBasic challenge.
Example
Basic realm="satellitedata.net"A per-minute, concurrency, monthly or per-IP limit was hit. Retry-After says when to retry.
RFC 9457 problem details. Every 4xx and 5xx response uses this shape with media type application/problem+json. The type URL opens a documentation page that explains the cause and the fix.
object
URL of the documentation page for this problem type, stable for the life of /v1.
Short summary of the problem type. It does not change between occurrences.
HTTP status code, repeated for clients that lose the status line.
Explanation specific to this occurrence, written for a developer.
Path of the request that failed.
Machine-readable problem code; equals the last path segment of type.
Request id, also sent in X-Request-Id. Quote it in support requests.
Field-level validation failures, present on 400 and 422.
One field-level failure.
object
JSON Pointer (RFC 6901) into the request body, or the query parameter name.
What is wrong with that member.
Seconds until the request can succeed; equals the Retry-After header.
The limit that was hit and the value requested, for example maxWidth and requestedWidth.
object
Units the request would have cost, computed before execution.
OAuth 2.0 error code (RFC 6749 section 5.2). Present only on /oauth/token responses.
OAuth 2.0 error description. Present only on /oauth/token responses.
Copy of detail for openEO clients, which read message. Present only on /v1/openeo routes.
Example
{ "type": "https://docs.satellitedata.net/problems/rate-limited", "title": "Rate limit exceeded", "status": 429, "detail": "This key spent 300 of its 300 units in the current minute.", "instance": "/v1/process", "code": "rate-limited", "requestId": "01JQ7Z3M8R5V2W6X9Y0A1B2C3D", "retryAfter": 17, "limits": { "unitsPerMinute": 300, "unitsSpentThisMinute": 300 }}Headers
Section titled “Headers”Request id for support and logs.
Example
01JQ7Z3M8R5V2W6X9Y0A1B2C3DSeconds to wait before retrying.
Example
17Remaining units and seconds to reset in the current window (IETF RateLimit header draft).
Example
"units";r=287;t=41Quota policy of the caller (IETF RateLimit header draft).
Example
"units";q=300;w=60An unexpected server error. No units are charged.
RFC 9457 problem details. Every 4xx and 5xx response uses this shape with media type application/problem+json. The type URL opens a documentation page that explains the cause and the fix.
object
URL of the documentation page for this problem type, stable for the life of /v1.
Short summary of the problem type. It does not change between occurrences.
HTTP status code, repeated for clients that lose the status line.
Explanation specific to this occurrence, written for a developer.
Path of the request that failed.
Machine-readable problem code; equals the last path segment of type.
Request id, also sent in X-Request-Id. Quote it in support requests.
Field-level validation failures, present on 400 and 422.
One field-level failure.
object
JSON Pointer (RFC 6901) into the request body, or the query parameter name.
What is wrong with that member.
Seconds until the request can succeed; equals the Retry-After header.
The limit that was hit and the value requested, for example maxWidth and requestedWidth.
object
Units the request would have cost, computed before execution.
OAuth 2.0 error code (RFC 6749 section 5.2). Present only on /oauth/token responses.
OAuth 2.0 error description. Present only on /oauth/token responses.
Copy of detail for openEO clients, which read message. Present only on /v1/openeo routes.
Example
{ "type": "https://docs.satellitedata.net/problems/internal", "title": "Internal error", "status": 500, "detail": "The request failed on our side and was logged. No units were charged.", "instance": "/v1/process", "code": "internal", "requestId": "01JQ7Z3M8R5V2W6X9Y0A1B2C3D"}Headers
Section titled “Headers”Request id for support and logs.
Example
01JQ7Z3M8R5V2W6X9Y0A1B2C3D