# social.coves.actor.getLikes

> Get the posts and comments a user upvoted, most recent vote first. Requires auth; only the user themselves may list their likes. Pages can be short or empty while a cursor is still returned; keep following the cursor.

- Kind: query
- Authority: actor.coves.social
- Lexicon: 1
- Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.actor.getLikes)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.actor.getLikes/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.actor.getLikes/analytics)

## Query (`social.coves.actor.getLikes`)

Type: query · GET

### Parameters (query string)

- `actor` (string, required): DID or handle of the user, or a bridged user's fediverse address as name@host or @name@host (e.g. alice@lemmy.world). Must resolve to the authenticated viewer.
  - Constraints: maxLength: 2048
- `cursor` (string)
  - Constraints: maxLength: 500
- `filter` (string): Which likes to list: all (posts and comments together), posts, or comments.
  - Constraints: maxLength: 64, default: "all", knownValues: all | posts | comments
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50

### Output (application/json)

- `cursor` (string)
  - Constraints: maxLength: 500
- `feed` (array, required)
  - `items` (union)
    - One of: `#likedPost`, `#likedComment`

### Errors

- `ActorNotFound`: Actor not found
- `AmbiguousActor`: More than one bridged user matches the name@host actor
- `InvalidRequest`: Unknown filter or malformed parameter
- `InvalidCursor`: Invalid pagination cursor
- `NotAllowed`: The actor is not the authenticated viewer

## #likedComment (`social.coves.actor.getLikes#likedComment`)

Type: object

A comment the user upvoted, with the root post of its thread.

### Properties

- `comment` (ref, required)
  - Reference: `social.coves.community.comment.defs#commentView`
- `post` (ref, required): The root post of the comment's thread.
  - Reference: `social.coves.community.post.defs#postView`

## #likedPost (`social.coves.actor.getLikes#likedPost`)

Type: object

A post the user upvoted.

### Properties

- `post` (ref, required)
  - Reference: `social.coves.community.post.defs#postView`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "likedComment": {
      "description": "A comment the user upvoted, with the root post of its thread.",
      "properties": {
        "comment": {
          "ref": "social.coves.community.comment.defs#commentView",
          "type": "ref"
        },
        "post": {
          "description": "The root post of the comment's thread.",
          "ref": "social.coves.community.post.defs#postView",
          "type": "ref"
        }
      },
      "required": [
        "comment",
        "post"
      ],
      "type": "object"
    },
    "likedPost": {
      "description": "A post the user upvoted.",
      "properties": {
        "post": {
          "ref": "social.coves.community.post.defs#postView",
          "type": "ref"
        }
      },
      "required": [
        "post"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get the posts and comments a user upvoted, most recent vote first. Requires auth; only the user themselves may list their likes. Pages can be short or empty while a cursor is still returned; keep following the cursor.",
      "errors": [
        {
          "description": "Actor not found",
          "name": "ActorNotFound"
        },
        {
          "description": "More than one bridged user matches the name@host actor",
          "name": "AmbiguousActor"
        },
        {
          "description": "Unknown filter or malformed parameter",
          "name": "InvalidRequest"
        },
        {
          "description": "Invalid pagination cursor",
          "name": "InvalidCursor"
        },
        {
          "description": "The actor is not the authenticated viewer",
          "name": "NotAllowed"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "maxLength": 500,
              "type": "string"
            },
            "feed": {
              "items": {
                "refs": [
                  "#likedPost",
                  "#likedComment"
                ],
                "type": "union"
              },
              "type": "array"
            }
          },
          "required": [
            "feed"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "actor": {
            "description": "DID or handle of the user, or a bridged user's fediverse address as name@host or @name@host (e.g. alice@lemmy.world). Must resolve to the authenticated viewer.",
            "maxLength": 2048,
            "type": "string"
          },
          "cursor": {
            "maxLength": 500,
            "type": "string"
          },
          "filter": {
            "default": "all",
            "description": "Which likes to list: all (posts and comments together), posts, or comments.",
            "knownValues": [
              "all",
              "posts",
              "comments"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "actor"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.coves.actor.getLikes",
  "lexicon": 1
}
```
