Integration Process Overview
- Register your Application: Create a developer account and register your application in the Memoram Developer Portal.
- Get API Key: Obtain your developer API key from the Developer Portal.
- Get JWT Token: Exchange your API key for a short-lived JWT Bearer Token using the
/auth/tokenendpoint. This token is required for most subsequent API calls. - Implement User Authorization (OAuth 2.0): Redirect users to Memoram to grant your application permission to access their memory.
- Exchange Authorization Code: Exchange the received authorization code for user-specific tokens and the crucial
memory_keyusing the/oauth/tokenendpoint. - Request Access Credentials: Use the
memory_keyand your JWT to request access via the/access-requestsendpoint. The user approves this in their Memoram dashboard. - Get Encryption Key: Once approved, retrieve the user’s
encryption_keyfrom/access-requests/{request_id}/credentials. - Access Memory Blobs: Use your JWT, the user’s ID, and the
encryption_keyto retrieve, create, update, or delete memory blobs using the/memory-blobsendpoints. - Manage Tags: Retrieve available tags using the
/tagsendpoints.
Authentication and Authorization
Memoram uses two primary methods for securing API access:- Developer JWT Token: For authenticating your application itself.
- User OAuth 2.0 Flow: For authorizing your application to access a specific user’s memory.
1. Getting Your Developer JWT Token
Before making most API calls, you need a short-lived JWT Bearer token. Exchange your permanent developer API key (found in the Developer Portal) for this token.token field). Include this token in the Authorization: Bearer <token> header for subsequent API calls.
2. Authorizing User Memory Access (OAuth 2.0 - Conceptual Overview)
While the full OAuth 2.0 flow (redirecting users, handling callbacks) is standard, the key Memoram-specific steps involve: a. Getting the User’s Memory Key: After a user successfully authenticates and authorizes your app via the standard OAuthredirect_uri callback, you will receive an authorization_code. Exchange this code for tokens.
memory_key.
memory_key.
encryption_key.
user_id and encryption_key needed to interact with the /memory-blobs and /tags endpoints for that specific user.