# List reactions grouped by text

`GET /api/reaction/{targetType}/{targetId}`

URL: https://repsona.com/api/get-reaction-targettype-targetid

Old ReactionController.groupBy compatible: [{ text, count, byMe }].

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `targetType` | path | project \| taskComment \| noteComment \| user \| activity \| introduction | required | Type of the target the reaction is attached to. |
| `targetId` | path | integer | required | ID of the target (a project, comment, user, and so on, depending on `targetType`). |

## Request

```sh
curl -X GET "https://<space>.repsona.com/api/reaction/{targetType}/{targetId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Reactions
- 401: Authentication is required
- 403: Not a project member
- 404: Target not found

## Example response

```json
{
  "reactions": [
    {
      "text": "👍",
      "count": 1,
      "byMe": true
    }
  ]
}
```
