mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
Update authentication docs with code examples and API endpoint
This commit is contained in:
parent
bf82efe2bf
commit
7b6793ecf8
1 changed files with 13 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Authentication
|
||||
description: API keys, scoped keys, and connector branding.
|
||||
title: "Authentication"
|
||||
description: "API keys, scoped keys, and connector branding."
|
||||
icon: "key"
|
||||
---
|
||||
|
||||
|
|
@ -21,12 +21,14 @@ curl https://api.supermemory.ai/v3/search \
|
|||
-d '{"q": "hello"}'
|
||||
```
|
||||
|
||||
|
||||
```typescript TypeScript
|
||||
import Supermemory from "supermemory";
|
||||
|
||||
const client = new Supermemory({ apiKey: "YOUR_API_KEY" });
|
||||
```
|
||||
|
||||
|
||||
```python Python
|
||||
from supermemory import Supermemory
|
||||
|
||||
|
|
@ -63,7 +65,7 @@ This works for Google Drive, Notion, and OneDrive. See the full setup in [Custom
|
|||
### Create a scoped key
|
||||
|
||||
```bash
|
||||
curl https://api.supermemory.ai/api/auth/scoped-key \
|
||||
curl https://api.supermemory.ai/v3/auth/scoped-key \
|
||||
--request POST \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Authorization: Bearer YOUR_API_KEY' \
|
||||
|
|
@ -76,13 +78,13 @@ This works for Google Drive, Notion, and OneDrive. See the full setup in [Custom
|
|||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Required | Default | Description |
|
||||
|-----------|----------|---------|-------------|
|
||||
| `containerTag` | Yes | — | Alphanumeric, hyphens, underscores, colons, dots |
|
||||
| `name` | No | `scoped_{containerTag}` | Display name for the key |
|
||||
| `expiresInDays` | No | — | 1–365 days |
|
||||
| `rateLimitMax` | No | `500` | Max requests per window (1–10,000) |
|
||||
| `rateLimitTimeWindow` | No | `60000` | Window in milliseconds (1–3,600,000) |
|
||||
| Parameter | Required | Default | Description |
|
||||
| --------------------- | -------- | ----------------------- | ------------------------------------------------ |
|
||||
| `containerTag` | Yes | — | Alphanumeric, hyphens, underscores, colons, dots |
|
||||
| `name` | No | `scoped_{containerTag}` | Display name for the key |
|
||||
| `expiresInDays` | No | — | 1–365 days |
|
||||
| `rateLimitMax` | No | `500` | Max requests per window (1–10,000) |
|
||||
| `rateLimitTimeWindow` | No | `60000` | Window in milliseconds (1–3,600,000) |
|
||||
|
||||
### Response
|
||||
|
||||
|
|
@ -98,4 +100,4 @@ This works for Google Drive, Notion, and OneDrive. See the full setup in [Custom
|
|||
```
|
||||
|
||||
Use the returned key exactly like a normal API key — it just won't work outside its container scope.
|
||||
</Accordion>
|
||||
</Accordion>
|
||||
Loading…
Add table
Reference in a new issue