Skip to content

Getting started

How can I start developing with Satellogic API?

Our API is available for registered account-holders of our platform. API Credentials will be provided upon account provisioning.

API Authentication

To use endpoints in our API, requests need to be sent with a valid Access Token. This token can be obtained via OAuth Client Credentials Flow. This Authentication Flow involves an application exchanging it's API Credentials for an Access Token.

Consider the following example:

Obtaining an Access Token

Request:

curl --location --request POST 'https://login.satellogic.com/oauth/token' \
--header 'content-type: application/json' \
--data-raw '{
    "client_id": "<API_CREDENTIAL_ID>",
    "client_secret": "<API_CREDENTIAL_SECRET>",
    "audience": "https://api.satellogic.com/",
    "grant_type": "client_credentials"
}'
Response:
{
    "access_token": "<ACCESS_TOKEN>",
    "scope": "api:tasking api:delivery",
    "expires_in": 86400,
    "token_type": "Bearer"
}

Once the Access Token is generated it will be valid for 24hrs, and it needs to be sent the request header under the authorizationToken header, preceded by the Bearer keyword as shown in the example bellow.

Authenticating API Requests
curl --location --request GET 'https://api.satellogic.com/tasking/tasks/' \
--header 'authorizationToken: Bearer <ACCESS_TOKEN>' 

Access Token Expiration

Access Tokens will expire in 24hrs and will need to be requested again. If an expired token is used the API will reply an unauthorized response.

Python example

import requests
import json

url = "https://login.satellogic.com/oauth/token"

payload = json.dumps({
  "client_id": "<API_CREDENTIAL_ID>",
  "client_secret": "<API_CREDENTIAL_SECRET>",
  "audience": "https://api.satellogic.com/",
  "grant_type": "client_credentials"
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Deprecated Authentication Method

Warning

We are discouraging the use of the legacy authentication method which involves explicitly sending API Credentials in requests. This approach is deemed less secure and we encourage all users to migrate their API Authentication to OAuth Client Credentials Flow described above.

Anatomy of an authorizationToken

authorizationToken: Key,Secret <API_CREDENTIAL_ID>,<API_CREDENTIAL_SECRET> 
Assuming tTcPujCyJTYxIPbdqfgL3gjKTZ39fLl3 is the API_CREDENTIAL_ID and D1xkJk0Eme8xvddBYoQpg33GJqcNwdpRQaoWNP0WYi96d44E0YwzWUb7D_S7L6X1 is the API_CREDENTIAL_SECRET

authorizationToken: Key,Secret tTcPujCyJTYxIPbdqfgL3gjKTZ39fLl3,D1xkJk0Eme8xvddBYoQpg33GJqcNwdpRQaoWNP0WYi96d44E0YwzWUb7D_S7L6X1 

Tools for REST API requests

Examples in this documentation use curl command line tool to compose and execute the requests. Graphical tools such as postman or VS Code Rest Client can also be used.

Example

Request (retrieves all tasks placed)

curl --location --request GET \ 
    'https://api.satellogic.com/tasking/tasks' \
    --header 'authorizationToken: Key,Secret <API_CREDENTIAL_ID>,<API_CREDENTIAL_SECRET>'

Response

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "task_id": 31001,
            "task_name": "Testing Collect 1",
            "project_name": "Demo Testing",
            "product": 90,
            "start": "2021-04-28T00:00:00Z",
            "end": "2021-04-30T23:59:59Z",
            "target": {
                "type": "Point",
                "coordinates": [
                    100.30,
                    5.40,
                    0.0
                ]
            },
            "created_time": "2021-04-27T13:54:42.366847Z",
            "status": "Received",
            "status_details": null,
            "rating": null,
            "priority": 13,
            "client": "Demo client"
        }
    ]
}

Last update: 2024-04-17