Quickstart
Get up and running with the ICEYE API Platform. This guide walks you through authentication and making your first API call.
Before you begin
You should have received these credentials from ICEYE:
| Credential | Description |
|---|---|
|
Authentication endpoint URL |
|
Your unique client identifier |
|
Your secret key (keep this secure!) |
|
Never commit your |
Step 1: Get an access token
Set your credentials as environment variables:
-
Linux/macOS
-
Windows (PowerShell)
export TOKEN_URL="your_token_url"
export CLIENT_ID="your_client_id"
export CLIENT_SECRET="your_client_secret"
$env:TOKEN_URL="your_token_url"
$env:CLIENT_ID="your_client_id"
$env:CLIENT_SECRET="your_client_secret"
Generate the base64-encoded key for authentication:
-
Linux/macOS
-
Windows (PowerShell)
export BASE64_KEY=$(printf '%s' "${CLIENT_ID}:${CLIENT_SECRET}" | base64)
$env:BASE64_KEY=[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("${env:CLIENT_ID}:${env:CLIENT_SECRET}"))
Request an access token:
-
cURL
-
PowerShell
-
Python
-
JavaScript
-
Java
curl --request POST \
--url "${TOKEN_URL}" \
--header "Authorization: Basic ${BASE64_KEY}" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "Accept: application/json" \
--data "grant_type=client_credentials"
$CLIENT_ID = "your_client_id"
$CLIENT_SECRET = "your_client_secret"
$TOKEN_URL = "your_token_url"
# Generate BASE64_KEY
$BASE64_KEY = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("${CLIENT_ID}:${CLIENT_SECRET}"))
# Get access token
$response = Invoke-RestMethod -Uri $TOKEN_URL `
-Method Post `
-Headers @{
"Authorization" = "Basic $BASE64_KEY"
"Content-Type" = "application/x-www-form-urlencoded"
"Accept" = "application/json"
} `
-Body "grant_type=client_credentials"
$accessToken = $response.access_token
Write-Host "Access token: $accessToken"
import base64
import requests
token_url = "your_token_url"
client_id = "your_client_id"
client_secret = "your_client_secret"
# Generate BASE64_KEY
credentials = f"{client_id}:{client_secret}"
base64_key = base64.b64encode(credentials.encode()).decode()
response = requests.post(
token_url,
headers={
'Authorization': f'Basic {base64_key}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
},
data={'grant_type': 'client_credentials'}
)
token_data = response.json()
access_token = token_data['access_token']
print(f"Access token: {access_token}")
const axios = require('axios');
const tokenUrl = "your_token_url";
const clientId = "your_client_id";
const clientSecret = "your_client_secret";
// Generate BASE64_KEY
const base64Key = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
async function getAccessToken() {
const response = await axios.post(
tokenUrl,
'grant_type=client_credentials',
{
headers: {
'Authorization': `Basic ${base64Key}`,
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
}
);
return response.data.access_token;
}
(async () => {
const token = await getAccessToken();
console.log('Access token:', token);
})();
import java.net.http.*;
import java.net.URI;
import java.util.Base64;
public class IceyeAuth {
public static void main(String[] args) throws Exception {
String tokenUrl = "your_token_url";
String clientId = "your_client_id";
String clientSecret = "your_client_secret";
// Generate BASE64_KEY
String credentials = clientId + ":" + clientSecret;
String base64Key = Base64.getEncoder().encodeToString(credentials.getBytes());
// Build request
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(tokenUrl))
.header("Authorization", "Basic " + base64Key)
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Accept", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("grant_type=client_credentials"))
.build();
// Send request
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
// Parse access_token from response
String json = response.body();
int start = json.indexOf("\"access_token\":\"") + 16;
int end = json.indexOf("\"", start);
String accessToken = json.substring(start, end);
System.out.println("Access token: " + accessToken);
}
}
Response:
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"scope": "catalog.read deliveries.read orders.read contracts.read"
}
Save the access_token value. You will need it for the next step.
|
Access tokens are valid for 1 hour. When your token expires, simply request a new one. For production applications that need automatic token management, see the Token Management How-To Guide. |
Step 2: Make your first API call
Use your access token to call the ICEYE API. Let’s retrieve your contracts:
-
cURL
-
PowerShell
-
Python
-
JavaScript
-
Java
export ACCESS_TOKEN="your_access_token_from_step_1"
curl --request GET \
--url "https://platform.iceye.com/api/company/v1/contracts" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/json"
$ACCESS_TOKEN = "your_access_token_from_step_1"
$response = Invoke-RestMethod -Uri "https://platform.iceye.com/api/company/v1/contracts" `
-Method Get `
-Headers @{
"Authorization" = "Bearer $ACCESS_TOKEN"
"Accept" = "application/json"
}
$contracts = $response.data
Write-Host "Found $($contracts.Count) contracts"
foreach ($contract in $contracts) {
Write-Host "- $($contract.name) (ID: $($contract.id))"
}
response = requests.get(
'https://platform.iceye.com/api/company/v1/contracts',
headers={
'Authorization': f'Bearer {access_token}',
'Accept': 'application/json'
}
)
contracts = response.json()
print(f"Found {len(contracts['data'])} contracts")
for contract in contracts['data']:
print(f"- {contract['name']} (ID: {contract['id']})")
const response = await axios.get(
'https://platform.iceye.com/api/company/v1/contracts',
{
headers: {
'Authorization': `Bearer ${accessToken}`,
'Accept': 'application/json'
}
}
);
const contracts = response.data;
console.log(`Found ${contracts.data.length} contracts`);
contracts.data.forEach(contract => {
console.log(`- ${contract.name} (ID: ${contract.id})`);
});
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://platform.iceye.com/api/company/v1/contracts"))
.header("Authorization", "Bearer " + accessToken)
.header("Accept", "application/json")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response:
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "My ICEYE Contract",
"status": "active"
}
]
}
If you see your contracts, you have successfully authenticated and made your first API call.
What’s next
Learn how to handle token expiration in production applications with the Token Management How-To Guide.
Follow the Build a Tasking Application tutorial to create a complete application using the ICEYE API Platform.