Skip to content

Get the list of reactions for Issue comments

GET /api/v5/repos/{owner}/{repo}/issues/comment/{comment_id}/user_reactions

This endpoint retrieves the list of reactions for a specified Issue comment and returns the user's emoji reaction records for that comment, including the emoji, the enum value, and information about the user who reacted. It supports filtering by emoji and paginated queries.

Access token support

  • AtomGit user access token (AtomGit user access tokens)

Anonymous access

This endpoint allows anonymous access.

Request parameters

Parameter Location Type Required Description
owner path string Yes Address path of the namespace that owns the repository (the address path of an organization or individual)
repo path string Yes Repository path (path)
comment_id path string Yes Comment ID
page query string No Current page number
per_page query string No Number of items per page
emoji_name query string No Emoji. Optional values: like / dislike / smile / confused / love / rocket / eyes / party

Response parameters

Field Type Always returned Nullable Description
(Array element) object Yes — Reaction record object (the response body is an array of reaction records)

Reaction record object

Field Type Always returned Nullable Description
id string Yes — Reaction record ID
emoji string Yes — Emoji
emoji_name string Yes — Emoji enum value
user object Yes — Information about the user who reacted

user object

Field Type Always returned Nullable Description
user.login string Yes — Login name
user.name string Yes — Username
user.avatar_url string Yes — User avatar address
user.object_id string Yes — User object ID

Error responses

This endpoint allows anonymous access, and normally no authentication is required for success. The following are common error response examples. Error field names are subject to the actual backend response.

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Invalid value for parameter emoji_name",
  "field": "emoji_name"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

HTTP status codes

Status code Description
200 Success (OK)
304 Not modified (Not modified)
401 Requires authentication (Requires authentication)
403 Forbidden (Forbidden)

Request example

Parameter notes

This endpoint allows anonymous access, so the examples do not need to carry an access token; if needed, append access_token=<token> to the URL query parameters.

Replace <owner> with the address path of the namespace that owns the repository (the address path of an organization or individual); replace <repo> with the repository path (path); replace <comment_id> with the comment ID. page, per_page, and emoji_name are all optional query parameters.

cURL

curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comment/<comment_id>/user_reactions?page=1&per_page=20&emoji_name=like' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comment/<comment_id>/user_reactions?page=1&per_page=20&emoji_name=like", {
  headers: {
    "Accept": "application/json",
  },
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.get(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/issues/comment/<comment_id>/user_reactions",
    params={"page": 1, "per_page": 20, "emoji_name": "like"},
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

[
  {
    "id": "12345",
    "emoji": "👍",
    "emoji_name": "like",
    "user": {
      "login": "octocat",
      "name": "Octo Cat",
      "avatar_url": "https://api.atomgit.com/avatar/octocat.png",
      "object_id": "1001"
    }
  }
]

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing or invalid access credential)
400 Invalid parameters or unparsable request
404 Request path does not exist
405 Request method not allowed
429 Too many requests; rate limit triggered
500 Internal server error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc