Rememberizer Docs
登入报名联系我们
简体中文
简体中文
  • 为什么选择 Rememberizer?
  • 背景
    • 什么是向量嵌入和向量数据库?
    • 术语表
    • 标准化术语
  • 个人使用
    • 开始使用
      • 搜索你的知识
      • 纪念品过滤访问
      • 常见知识
      • 管理你的嵌入知识
  • 集成
    • Rememberizer 应用
    • Rememberizer Slack 集成
    • Rememberizer Google Drive 集成
    • Rememberizer Dropbox 集成
    • Rememberizer Gmail 集成
    • Rememberizer Memory 集成
    • Rememberizer MCP 服务器
    • 管理第三方应用
  • 开发者资源
    • 开发者概述
  • 集成选项
    • 注册和使用 API 密钥
    • 注册 Rememberizer 应用
    • 授权 Rememberizer 应用
    • 创建一个 Rememberizer GPT
    • LangChain 集成
    • 向 Slack 发送消息的示例 Web 应用
  • 企业集成
    • 企业集成模式
  • API 参考
    • API 文档首页
    • 认证
  • 核心 API
    • 按语义相似性搜索文档
    • 检索文档
    • 检索文档内容
    • 检索 Slack 内容
    • 将内容记忆到 Rememberizer
  • 账户与配置
    • 检索当前用户账户详情
    • 列出可用的数据源集成
    • 备忘录
    • 获取所有添加的公共知识
  • 向量存储 API
    • 向量存储文档
    • 获取向量存储信息
    • 获取向量存储中的文档列表
    • 获取文档信息
    • 向向量存储添加新文本文档
    • 向向量存储上传文件
    • 更新向量存储中的文件内容
    • 在向量存储中移除文档
    • 通过语义相似性搜索向量存储文档
  • 其他资源
    • 通知
      • 使用条款
      • 隐私政策
      • B2B
        • 关于 Reddit Agent
  • 发布
    • 发布说明首页
  • 2025 发布
    • 2025年4月25日
    • 2025年4月18日
    • 2025年4月11日
    • 2025年4月4日
    • 2025年3月28日
    • 2025年3月21日
    • 2025年3月14日
    • 2025年1月17日
  • 2024 发布
    • 2024年12月27日
    • 2024年12月20日
    • 2024年12月13日
    • 2024年12月6日
  • 2024年11月29日
  • 2024年11月22日
  • 2024年11月15日
  • 2024年11月8日
  • 2024年11月1日
  • 2024年10月25日
  • 2024年10月18日
  • 2024年10月11日
  • 2024年10月4日
  • 2024年9月27日
  • 2024年9月20日
  • 2024年9月13日
  • 2024年8月16日
  • 2024年8月9日
  • 2024年8月2日
  • 2024年7月26日
  • 2024年7月12日
  • 2024年6月28日
  • 2024年6月14日
  • 2024年5月31日
  • 2024年5月17日
  • 2024年5月10日
  • 2024年4月26日
  • 2024年4月19日
  • 2024年4月12日
  • 2024年4月5日
  • 2024年3月25日
  • 2024年3月18日
  • 2024年3月11日
  • 2024年3月4日
  • 2024年2月26日
  • 2024年2月19日
  • 2024年2月12日
  • 2024年2月5日
  • 2024年1月29日
  • 2024年1月22日
  • 2024年1月15日
  • LLM 文档
    • Rememberizer LLM 准备文档
Powered by GitBook
On this page
  1. API 参考

认证

PreviousAPI 文档首页Next按语义相似性搜索文档

Last updated 23 days ago

Rememberizer 提供了多个认证端点来管理用户账户和会话。本文档概述了可用的认证 API。

注册

示例请求

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/signup/ \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "secure_password",
    "name": "John Doe",
    "captcha": "recaptcha_response"
  }'

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

const signUp = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/signup/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      email: 'user@example.com',
      password: 'secure_password',
      name: 'John Doe',
      captcha: 'recaptcha_response'
    })
  });
  
  const data = await response.json();
  console.log(data);
};

signUp();

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

import requests
import json

def sign_up():
    headers = {
        "Content-Type": "application/json"
    }
    
    payload = {
        "email": "user@example.com",
        "password": "secure_password",
        "name": "John Doe",
        "captcha": "recaptcha_response"
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/auth/signup/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    data = response.json()
    print(data)

sign_up()

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

登录

示例请求

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/signin/ \
  -H "Content-Type: application/json" \
  -d '{
    "login": "user@example.com",
    "password": "secure_password",
    "captcha": "recaptcha_response"
  }'

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

const signIn = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/signin/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      login: 'user@example.com',
      password: 'secure_password',
      captcha: 'recaptcha_response'
    })
  });
  
  // 检查响应中的身份验证 cookie
  if (response.status === 204) {
    console.log("登录成功!");
  } else {
    console.error("登录失败!");
  }
};

signIn();

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

import requests
import json

def sign_in():
    headers = {
        "Content-Type": "application/json"
    }
    
    payload = {
        "login": "user@example.com",
        "password": "secure_password",
        "captcha": "recaptcha_response"
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/auth/signin/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    if response.status_code == 204:
        print("登录成功!")
    else:
        print("登录失败!")

sign_in()

将 recaptcha_response 替换为实际的 reCAPTCHA 响应。

邮箱验证

示例请求

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/verify-email/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "verification_code": "123456"
  }'

将 YOUR_JWT_TOKEN 替换为您的实际 JWT 令牌,并使用发送到您电子邮件的验证代码。

const verifyEmail = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/verify-email/', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      verification_code: '123456'
    })
  });
  
  if (response.status === 200) {
    console.log("电子邮件验证成功!");
  } else {
    console.error("电子邮件验证失败!");
  }
};

verifyEmail();

将 YOUR_JWT_TOKEN 替换为您的实际 JWT 令牌,并使用发送到您电子邮件的验证代码。

import requests
import json

def verify_email():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "verification_code": "123456"
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/auth/verify-email/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    if response.status_code == 200:
        print("电子邮件验证成功!")
    else:
        print("电子邮件验证失败!")

verify_email()

将 YOUR_JWT_TOKEN 替换为您的实际 JWT 令牌,并使用发送到您电子邮件的验证代码。

令牌管理

示例请求

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/custom-refresh/ \
  -b "refresh_token=YOUR_REFRESH_TOKEN"

此端点使用 cookies 进行身份验证。刷新令牌应作为 cookie 发送。

const refreshToken = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/custom-refresh/', {
    method: 'POST',
    credentials: 'include' // 这将包括请求中的 cookies
  });
  
  if (response.status === 204) {
    console.log("令牌成功刷新!");
  } else {
    console.error("令牌刷新失败!");
  }
};

refreshToken();

此端点使用 cookies 进行身份验证。确保您的应用程序在请求中包含凭据。

import requests

def refresh_token():
    cookies = {
        "refresh_token": "YOUR_REFRESH_TOKEN"
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/auth/custom-refresh/",
        cookies=cookies
    )
    
    if response.status_code == 204:
        print("令牌成功刷新!")
    else:
        print("令牌刷新失败!")

refresh_token()

将 YOUR_REFRESH_TOKEN 替换为您的实际刷新令牌。

登出

示例请求

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/custom-logout/

此端点将清除身份验证 cookies。

const logout = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/custom-logout/', {
    method: 'POST',
    credentials: 'include' // 这将包括请求中的 cookies
  });
  
  if (response.status === 204) {
    console.log("注销成功!");
  } else {
    console.error("注销失败!");
  }
};

logout();

此端点使用 cookies 进行身份验证。确保您的应用程序在请求中包含凭据。

import requests

def logout():
    session = requests.Session()
    
    response = session.post(
        "https://api.rememberizer.ai/api/v1/auth/custom-logout/"
    )
    
    if response.status_code == 204:
        print("注销成功!")
    else:
        print("注销失败!")

logout()

此端点将清除身份验证 cookies。

{% endtabs %

  • 注册
  • 示例请求
  • 登录
  • 示例请求
  • 邮箱验证
  • 示例请求
  • 令牌管理
  • 示例请求
  • 登出
  • 示例请求