Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix(docs): Correct API authentication header from Bearer to Token (#3820)

Parth Sharma84bd6e3b9774
diff --git a/docs/api-reference/memory/add-memories.mdx b/docs/api-reference/memory/add-memories.mdx
index 004fcc73e..681a9f41c 100644
--- a/docs/api-reference/memory/add-memories.mdx
+++ b/docs/api-reference/memory/add-memories.mdx
@@ -17,7 +17,7 @@ Memories are processed asynchronously by default. The response contains queued e
| Header | Required | Description |
| --- | --- | --- |
-| `Authorization: Bearer <MEM0_API_KEY>` | Yes | API key scoped to your workspace. |
+| `Authorization: Token <MEM0_API_KEY>` | Yes | API key scoped to your workspace. |
| `Accept: application/json` | Yes | Ensures a JSON response. |
## Request body
diff --git a/docs/platform/quickstart.mdx b/docs/platform/quickstart.mdx
index e85f8f286..0a35f7abe 100644
--- a/docs/platform/quickstart.mdx
+++ b/docs/platform/quickstart.mdx
@@ -69,7 +69,7 @@ await client.add(messages, { user_id: "user123" });
```bash cURL
curl -X POST https://api.mem0.ai/v1/memories/add \
- -H "Authorization: Bearer $MEM0_API_KEY" \
+ -H "Authorization: Token $MEM0_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
@@ -97,7 +97,7 @@ console.log(results);
```bash cURL
curl -X POST https://api.mem0.ai/v1/memories/search \
- -H "Authorization: Bearer $MEM0_API_KEY" \
+ -H "Authorization: Token $MEM0_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are my dietary restrictions?",
diff --git a/docs/templates/api_reference_template.mdx b/docs/templates/api_reference_template.mdx
index b4cb7aab5..1cc884cdb 100644
--- a/docs/templates/api_reference_template.mdx
+++ b/docs/templates/api_reference_template.mdx
@@ -35,7 +35,7 @@ path: "/v1/memories"
| Method | Path | Auth | Rate Limit |
| --- | --- | --- | --- |
-| [METHOD] | `[path]` | Bearer (`mem0-api-key`) | [X req/min] |
+| [METHOD] | `[path]` | Token (`mem0-api-key`) | [X req/min] |
<Info>
Use this endpoint when [brief scenario]. Prefer [alternative endpoint] for [other scenario].
@@ -51,7 +51,7 @@ path: "/v1/memories"
| Name | Required | Description |
| --- | --- | --- |
-| `Authorization` | Yes | `Bearer YOUR_API_KEY` |
+| `Authorization` | Yes | `Token YOUR_API_KEY` |
| `Content-Type` | Yes | `application/json` |
### Body
@@ -65,7 +65,7 @@ path: "/v1/memories"
<CodeGroup>
```bash Shell
curl https://api.mem0.ai/v1/memories \
- -H "Authorization: Bearer $MEM0_API_KEY" \
+ -H "Authorization: Token $MEM0_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "user_id": "alex", "memory": "Prefers email follow-ups." }'
```
@@ -75,7 +75,7 @@ import requests
resp = requests.post(
"https://api.mem0.ai/v1/memories",
- headers={"Authorization": f"Bearer {API_KEY}"},
+ headers={"Authorization": f"Token {API_KEY}"},
json={"user_id": "alex", "memory": "Prefers email follow-ups."},
)
resp.raise_for_status()
@@ -85,7 +85,7 @@ resp.raise_for_status()
const response = await fetch("https://api.mem0.ai/v1/memories", {
method: "POST",
headers: {
- Authorization: `Bearer ${process.env.MEM0_API_KEY}`,
+ Authorization: `Token ${process.env.MEM0_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ user_id: "alex", memory: "Prefers email follow-ups." }),