Open Context Protocol is live! 🚀 Read the launch post

usersProfileGet

Retrieves a user’s profile information.

Details

  • Method: GET
  • Path: /users.profile.get
  • Operation ID: users_profile_get

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `users.profile:read`",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "include_labels": {
    "description": "Include labels for each ID in custom profile fields",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "user": {
    "description": "User to retrieve profile info for",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Schema for successful response from users.profile.get method",
  "properties": {
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    },
    "profile": {
      "additionalProperties": false,
      "properties": {
        "always_active": {
          "type": "boolean"
        },
        "api_app_id": {
          "pattern": "^(A[A-Z0-9]{1,})?$",
          "title": "App ID or empty string",
          "type": "string"
        },
        "avatar_hash": {
          "type": "string"
        },
        "bot_id": {
          "pattern": "^B[A-Z0-9]{8,}$",
          "title": "Bot User ID",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "display_name_normalized": {
          "type": "string"
        },
        "email": {
          "format": "email",
          "type": [
            "null",
            "string"
          ]
        },
        "fields": {
          "items": {
            "type": "object"
          },
          "type": [
            "object",
            "null",
            "array"
          ]
        },
        "first_name": {
          "type": [
            "null",
            "string"
          ]
        },
        "guest_expiration_ts": {
          "type": [
            "null",
            "integer"
          ]
        },
        "guest_invited_by": {
          "type": [
            "null",
            "string"
          ]
        },
        "image_1024": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_192": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_24": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_32": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_48": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_512": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_72": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "image_original": {
          "format": "uri",
          "type": [
            "null",
            "string"
          ]
        },
        "is_app_user": {
          "type": "boolean"
        },
        "is_custom_image": {
          "type": "boolean"
        },
        "is_restricted": {
          "type": [
            "null",
            "boolean"
          ]
        },
        "is_ultra_restricted": {
          "type": [
            "null",
            "boolean"
          ]
        },
        "last_avatar_image_hash": {
          "type": "string"
        },
        "last_name": {
          "type": [
            "null",
            "string"
          ]
        },
        "memberships_count": {
          "type": "integer"
        },
        "name": {
          "type": [
            "null",
            "string"
          ]
        },
        "phone": {
          "type": "string"
        },
        "pronouns": {
          "type": "string"
        },
        "real_name": {
          "type": "string"
        },
        "real_name_normalized": {
          "type": "string"
        },
        "skype": {
          "type": "string"
        },
        "status_default_emoji": {
          "type": "string"
        },
        "status_default_text": {
          "type": "string"
        },
        "status_default_text_canonical": {
          "type": [
            "null",
            "string"
          ]
        },
        "status_emoji": {
          "type": "string"
        },
        "status_expiration": {
          "type": "integer"
        },
        "status_text": {
          "type": "string"
        },
        "status_text_canonical": {
          "type": [
            "null",
            "string"
          ]
        },
        "team": {
          "pattern": "^[TE][A-Z0-9]{8,}$",
          "title": "Team or Enterprise ID",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "updated": {
          "type": "integer"
        },
        "user_id": {
          "type": "string"
        },
        "username": {
          "type": [
            "null",
            "string"
          ]
        }
      },
      "required": [
        "real_name",
        "display_name",
        "avatar_hash",
        "real_name_normalized",
        "display_name_normalized",
        "title",
        "phone",
        "skype",
        "status_text",
        "status_emoji",
        "fields"
      ],
      "title": "User profile object",
      "type": "object"
    }
  },
  "required": [
    "ok",
    "profile"
  ],
  "title": "users.profile.get schema",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('slack')

# Call this tool
result = await agent.call_tool('usersProfileGet', {
    # Add required parameters here
})