GET
/
api
/
v1
/
users
/
profile
/
{user_id}
# To use the Python SDK, install the package:
# pip install memobase

from memobase import Memobase

client = Memobase(project_url='PROJECT_URL', api_key='PROJECT_TOKEN')

u = client.get_user(uid)
p = u.profile()
{
  "data": {
    "profiles": [
      {
        "id": "<string>",
        "content": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "attributes": {}
      }
    ]
  },
  "errno": 0,
  "errmsg": ""
}

Retrieve the real-time user profiles for long-term memory. This endpoint provides access to the consolidated profile information generated from user’s memory data.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string
required

The ID of the user to get profiles for

Query Parameters

topk
integer

Number of profiles to retrieve, default is all

max_token_size
integer

Max token size of returned profile content, default is all

prefer_topics
string[]

Rank prefer topics at first to try to keep them in filtering, default order is by updated time

only_topics
string[]

Only return profiles with these topics, default is all

max_subtopic_size
integer

Max subtopic size of the same topic in returned profile, default is all

topic_limits_json
string

Set specific subtopic limits for topics in JSON, for example {"topic1": 3, "topic2": 5}. The limits in this param will override max_subtopic_size.

Response

200
application/json
Successful Response
data
object | null

Response containing user profiles

errno
enum<integer>

Error code, 0 means success

Available options:
0,
400,
401,
403,
404,
405,
409,
422,
500,
501,
502,
503,
504
errmsg
string
default:

Error message, empty when success