> ## Documentation Index
> Fetch the complete documentation index at: https://connectionshub.atlastube.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate Connections Hub API requests with an API key.

Every Connections Hub API request needs an **API key**, sent as a bearer token:

```
GET /v1/projects HTTP/1.1
Host: api.calcs.com
Authorization: Bearer YOUR_API_KEY
```

## Getting an API key

The Connections Hub API is in closed beta.

**NCSEA hackathon participants:** your API key has been sent to your email address.

**Everyone else:** to request access, [contact Atlas Tube](https://www.atlastube.com/contact-us/).

Once you have a key, store it securely, for example in an environment variable.

> [!WARNING]
>
> Never put an API key in client-side code or a public repository. Call the API from your own server.

## Making authenticated requests

```bash cURL theme={null}
curl "https://api.calcs.com/v1/projects" \
  -H "Authorization: Bearer $HUB_API_KEY"
```

```javascript Node.js theme={null}
const response = await fetch("https://api.calcs.com/v1/projects", {
  headers: { Authorization: `Bearer ${process.env.HUB_API_KEY}` },
});
const data = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.get(
    "https://api.calcs.com/v1/projects",
    headers={"Authorization": f"Bearer {os.environ['HUB_API_KEY']}"},
)
data = response.json()
```

## Best practices

* **Use environment variables** for keys, never source code.
* **Call the API from your server**, not from browsers or mobile apps.
* **Use HTTPS.** The API does not accept plain HTTP.

Next: [Quick start](https://connectionshub.atlastube.com/docs/api/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.