Skip to main content
User Profiles

Get User Profile

Get the profile attributes of a specified user

GET
/profile_schemas/{profile_schema_id}/user_profile
cURL
curl --request GET \
  --url 'https://dashscope.aliyuncs.com/api/v2/apps/memory/profile_schemas/{profile_schema_id}/user_profile?user_id=%3Cstring%3E' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "request_id": "<string>",
  "profile": {
    "attributes": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  }
}
Gets the profile attributes of a specified user. After calling AddMemory to add a conversation, wait approximately 3 seconds for profile extraction to complete.
If all returned attribute values are empty, verify that AddMemory was called with the same profile_schema. Without that parameter, profile extraction is not triggered.

Request parameters

ParameterTypeRequiredDescription
profile_schema_idstringYesProfile schema ID (path parameter)
user_idstringYesMemory entity ID

Response

FieldTypeDescription
request_idstringRequest ID
profile.attributesarrayProfile attribute list
profile.attributes[].namestringAttribute name
profile.attributes[].valuestringAttribute value

Code examples

curl -X GET "https://dashscope.aliyuncs.com/api/v2/apps/memory/profile_schemas/{profile_schema_id}/user_profile?user_id=user_001" \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
  --header "Content-Type: application/json"

# response
{
  "profile": {
    "attributes": [
      {"name": "年龄", "value": "28"},
      {"name": "职业", "value": "软件工程师"},
      {"name": "爱好", "value": "踢足球"}
    ]
  },
  "request_id": "f9g0h1i2-..."
}
For the complete profile workflow, see Using User Profiles.

Authorizations

string
header
required

Path Parameters

string
required

画像模板 ID

Query Parameters

string
required

记忆实体 ID

Response

200-application/json
string
object
Overview
Managed Agent API
Sandbox API
Flow Agent API
RAG API
Connector API
Framework Integration
Assistant API (Deprecating)
  • Overview