/User-Profile

Overview

The /user-profile endpoint returns the latest profile event for the given public key.

Endpoint Details

  • URL: /user-profile

  • Method: GET

  • Auth Required: No

  • Permissions Required: None

Request Parameters

Response Schema

The response is a JSON object with the following structure:

{
  "profile": {
    "id": "profile_event_id",
    "pubkey": "user_pubkey",
    "created_at": 1234567890,
    "kind": 0,
    "tags": [],
    "content": "Profile content in JSON format",
    "sig": "event_signature"
  }
}
  • profile: The most recent profile metadata event (kind 0) for the requested user.

Example Call

curl -X GET "https://huddlers-ovduv.ondigitalocean.app/user-profile?pubkey=82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2"

Error Responses

  • 400 Bad Request: If the pubkey parameter is missing or invalid.

  • 404 Not Found: If no profile can be found for the given pubkey.

  • 500 Internal Server Error: If there's an issue processing the request.

Last updated