Get User Reaction
curl --request GET \
--url https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyComment Endpoints
Get User Reaction
Get the authenticated user’s reaction on a comment
Get User Reaction
curl --request GET \
--url https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyReturns the authenticated user’s current reaction on the specified comment, or
or, if the user has no reaction:
null if they have not reacted.
Authentication required.
Path Parameters
string
required
The UUID of the comment.
Query Parameters
string
The user whose reaction to return. Service or master key only, and required with one — a key has no user of its own, so leaving it out returns
400 comment/missing-user-id. A user token always reads its own reaction: naming a different user returns 403 comment/unauthorized.Response
{ "reactionType": "like" }
{ "reactionType": null }
Error Responses
Invalid Params — 400
Invalid Params — 400
Returned when
commentId isn’t a valid UUID.{ "error": "commentId: Invalid UUID format", "code": "comment/invalid-params" }
Acting as another user — 403
Acting as another user — 403
Returned when a request authenticated with a user token sends a
userId other than that user’s own ID.{ "error": "Unauthorized", "code": "comment/unauthorized" }
Missing User — 400
Missing User — 400
Returned when a service or master key sends no
userId.{ "error": "Missing user ID", "code": "comment/missing-user-id" }
Not Found — 404
Not Found — 404
Returned when the comment doesn’t exist, or is on an entity whose author has blocked the user (the user’s own comments excepted).
{ "error": "Comment not found.", "code": "comment/not-found" }

