Rememberizer Docs
登入報名聯絡我們
繁體中文
繁體中文
  • 為什麼選擇 Rememberizer?
  • 背景
    • 什麼是向量嵌入和向量數據庫?
    • 術語表
    • 標準化術語
  • 個人使用
    • 開始使用
      • 搜尋你的知識
      • 紀念品過濾訪問
      • 常見知識
      • 管理你的嵌入知識
  • 整合
    • Rememberizer 應用程式
    • Rememberizer Slack 整合
    • Rememberizer Google Drive 整合
    • Rememberizer Dropbox 整合
    • Rememberizer Gmail 整合
    • Rememberizer Memory 整合
    • Rememberizer MCP 伺服器
    • 管理第三方應用程式
  • 開發者資源
    • 開發者概覽
  • 整合選項
    • 註冊和使用 API 金鑰
    • 註冊 Rememberizer 應用程式
    • 授權 Rememberizer 應用程式
    • 創建 Rememberizer GPT
    • LangChain 整合
    • 向 Slack 談話的範例網頁應用程式
  • 企業整合
    • 企業整合模式
  • API 參考
    • API 文件首頁
    • 身份驗證
  • 核心 API
    • 依語意相似性搜尋文件
    • 檢索文件
    • 檢索文件內容
    • 檢索 Slack 內容
    • 將內容記憶到 Rememberizer
  • 帳戶與配置
    • 檢索當前用戶帳戶詳細信息
    • 列出可用的數據源集成
    • 備忘錄
    • 獲取所有已添加的公共知識
  • 向量存儲 API
    • 向量存儲文檔
    • 獲取向量存儲信息
    • 獲取向量存儲中的文檔列表
    • 獲取文檔信息
    • 向向量存儲添加新文本文檔
    • 將文件上傳到向量存儲
    • 更新向量存儲中的文件內容
    • 在向量存儲中移除文檔
    • 按語義相似性搜索向量存儲文檔
  • 其他資源
    • 通知
      • 使用條款
      • 隱私政策
      • B2B
        • 關於 Reddit 代理
  • 發布
    • 發布說明首頁
  • 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/

此端點將清除身份驗證 cookie。

const logout = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/custom-logout/', {
    method: 'POST',
    credentials: 'include' // 這會在請求中包含 cookie
  });
  
  if (response.status === 204) {
    console.log("登出成功!");
  } else {
    console.error("登出失敗!");
  }
};

logout();

此端點使用 cookie 進行身份驗證。請確保您的應用程序在請求中包含憑證。

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()

此端點將清除身份驗證 cookie。

{% endtabs %

  • 註冊
  • 範例請求
  • 登入
  • 範例請求
  • 電子郵件驗證
  • 範例請求
  • 令牌管理
  • 示例請求
  • 登出
  • 範例請求