Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.13 KB

authentication.mdx

File metadata and controls

31 lines (23 loc) · 1.13 KB
title description icon
Authentication
To access the Tilebox API, you must authenticate your requests. This guide explains how authentication works, focusing on API keys used as bearer tokens.
key

Creating an API key

To create an API key, log into the Tilebox Console. Navigate to Account -> API Keys and click the "Create API Key" button.

Keep your API keys secure. Deactivate any keys if you suspect they have been compromised.

Bearer token authentication

The Tilebox API uses bearer tokens for authentication. You need to pass your API key as the token parameter when creating an instance of the client.

```python Python from tilebox.datasets import Client as DatasetsClient from tilebox.workflows import Client as WorkflowsClient

datasets_client = DatasetsClient(token="YOUR_TILEBOX_API_KEY") workflows_client = WorkflowsClient(token="YOUR_TILEBOX_API_KEY")

</CodeGroup>

<Tip>
If you set your API key as an environment variable named `TILEBOX_API_KEY`, you can skip the token parameter when creating a client.
</Tip>