Temporary Access Tokens
Obtaining an Access Token
You can generate a temporary access token from the Canopy account page.
- Click the copy icon to copy the token to your clipboard.
- Tokens are valid for multiple requests, but expire after 24 hours.
- When a token expires, generate a new one from the account page.
Using an Access Token to make requests
Include the token in the Authorization header of your requests in the format:
Authorization: Bearer <access_token>In this example, we're querying the Search Items endpoint to retrieve one item:
Example cURL
curl --request GET \
--url 'https://api.canopy.umbra.space/stac/search?limit=1' \
--header 'Accept: application/geo+json' \
--header 'Authorization: Bearer <access_token>'Example response (truncated)
{
"type": "FeatureCollection",
"context": {
"limit": 1,
"returned": 1
},
"features": [
{
"id": "<id>",
"links": [
{
"rel": "collection",
"type": "application/json",
"href": "https://api.canopy.umbra.space/collections/<org>"
}
// ... additional links
],
"assets": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[18.61596485189158, -33.98736266276227, 0],
[18.628773115767444, -33.952916395537784, 0]
// ... additional coordinates
]
]
},
"collection": "<org>",
"properties": {
"created": "2022-06-03T19:12:23Z",
"datetime": "2022-06-11T11:54:30Z",
"platform": "<platform>",
"umbra:status": "COMMANDED",
"sar:instrument_mode": "SPOTLIGHT"
// ... additional properties
}
}
],
"links": [
// ... pagination and navigation links
]
}Using Access Tokens in the API Reference
You can also use your access token directly in the API Reference:
- Open any endpoint (e.g. Search Items).
- Enter your token in the Authentication section.
- Click Try It! to run the request.
The API Reference will generate example code in multiple languages that you can copy and reuse.
For automated token generation, see Authenticate via Client Credentials.
Updated about 1 month ago