Skip to main content

Authentication

MemSync uses simple API key authentication to protect user data and ensure only authorized access to memories and profiles.
Coming Soon: OAuth 2.0 authentication will be available for enhanced security and easier integration with third-party applications.

API Key Authentication

How it Works

MemSync uses API keys for authentication:
1

API Key Generation

Generate an API key from your MemSync dashboard
2

API Requests

Include the API key in the X-API-Key header for all API requests
3

Key Validation

MemSync validates the API key and permissions

Using API Keys

Key Requirements

  • Header: X-API-Key
  • Validation: Must be a valid, active API key
  • Format: Simple string key

API Key Features

Simple Integration

Easy integration for third-party applications and services

Enhanced Security

App-specific keys with granular permissions and rate limiting

Usage Tracking

Monitor API usage and performance

Easy Management

Create and manage keys through the dashboard

Security Best Practices

API Key Security

Store API keys securely and never expose them in client-side code
Keep your API keys secure and rotate them when needed
Handle authentication errors gracefully

Network Security

  • HTTPS Only: All API communications use HTTPS encryption
  • Rate Limiting: Built-in rate limiting prevents abuse
  • Request Validation: All requests are validated for proper format and permissions

User Context

MemSync automatically associates API requests with your account:

Error Responses

Authentication Errors

Common Error Scenarios

Causes:
  • Missing X-API-Key header
  • Invalid API key
  • API key not found in system
Response:
Causes:
  • Valid API key but insufficient permissions
  • Rate limit exceeded
Response:
Causes:
  • Rate limit exceeded
  • Too many requests in short time period
Response:

Integration Examples

Python SDK Example

JavaScript Example

Testing Authentication

Validate Your API Key

Debug Authentication Issues

Next Steps

API Reference

Explore the complete API documentation with authentication examples

Quickstart

Get started with your first authenticated API calls

Integrations

Learn about authentication for external integrations

Development

Set up authentication for local development