From 84bd6e3b97745f0458d8971259c1210a2e5c3ab3 Mon Sep 17 00:00:00 2001 From: Parth Sharma <109902593+parthshr370@users.noreply.github.com> Date: Thu, 11 Dec 2025 00:32:59 +0530 Subject: [PATCH] fix(docs): Correct API authentication header from Bearer to Token (#3820) --- docs/api-reference/memory/add-memories.mdx | 2 +- docs/platform/quickstart.mdx | 4 ++-- docs/templates/api_reference_template.mdx | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) 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 ` | Yes | API key scoped to your workspace. | +| `Authorization: Token ` | 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] | 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" ```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." }),