/memory/read/continueContinue Reading
Continue reading memories using an existing revocation token. This allows you to re-read the same data without creating a new read grant.
All requests require authentication via the X-API-Key header.
{
"revocation_token": "string (required) - The revocation token from a previous read operation"
}Field Descriptions
revocation_token- The revocation token returned from a previous /memory/read operation. This token identifies the read grant and allows you to continue reading the same data.
Example Request
from memory_scope import MemoryScopeClient
client = MemoryScopeClient(api_key="your-api-key")
# First, read memories and get a revocation token
result = client.read_memory(
user_id="user123",
scope="preferences",
domain="food",
purpose="generate food recommendations"
)
revocation_token = result.revocation_token
# Later, continue reading with the same token
result = client.read_memory_continue(
revocation_token=revocation_token
)
# Same data is returned without creating a new grant
print(result.summary_struct)Status Code: 200 OK
The response format is identical to the /memory/read endpoint:
{
"summary_text": "Likes: 2, Dislikes: 1, Settings: 0",
"summary_struct": {
"likes": [
"pizza",
"sushi"
],
"dislikes": [
"broccoli"
],
"settings": {}
},
"confidence": 0.85,
"revocation_token": "rev_xyz789...",
"expires_at": "2026-01-28T10:15:24Z"
}Note: The same revocation token is returned, allowing you to continue reading multiple times if needed.
400 Bad Request
Invalid request body or missing required fields.
{
"detail": "Field 'revocation_token' is required"
}401 Unauthorized
Invalid or missing API key.
{
"detail": "Invalid API key"
}404 Not Found
The revocation token is invalid, expired, or has been revoked.
{
"detail": "Revocation token not found or expired"
}Re-reading Data
When you need to access the same memory data multiple times (e.g., in different parts of your application flow), use continue to avoid creating multiple read grants.
Caching Refresh
If you cache memory data and need to refresh it, use continue to re-read without creating a new grant.
Error Recovery
If a read operation fails after receiving the revocation token, you can use continue to retry without making a new read request.
- Store Tokens Securely: Revocation tokens should be stored securely and associated with the user session.
- Check Expiration: Before using continue, check if the token has expired using the expires_at field from the original read.
- Handle 404 Errors: If a token is invalid or revoked, handle the 404 response gracefully and make a new read request if needed.
- Don't Overuse: Only use continue when you actually need to re-read the same data. For new data access, use the regular read endpoint.
- Respect Revocation: If a user revokes access, the token will no longer work. Always handle this case in your application.