Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 24.7 KB

File metadata and controls

38 lines (28 loc) · 24.7 KB
id posts-controller-get-comments
title Get Comments for a Quran Reflect Lesson or Reflection
description Retrieve paginated top-level comments for a Quran Reflect lesson or reflection post. The response returns comment objects plus pagination metadata including `total`, `currentPage`, `limit`, and `pages`. Use the replies endpoint to get nested replies for specific comments. Full gateway path is `/quran-reflect/v1/posts/{id}/comments`; this is not a `/content/api/v4` endpoint. This Quran Reflect endpoint is compatible with the `client_credentials` grant and requires `x-auth-token` and `x-client-id` with the `comment.read` scope. User-bound tokens may still influence comment visibility.
sidebar_label Get Comments for a Quran Reflect Lesson or Reflection
hide_title true
hide_table_of_contents true
api
operationId description parameters responses tags servers security method path securitySchemes info postman
PostsController_getComments
Retrieve paginated top-level comments for a Quran Reflect lesson or reflection post. The response returns comment objects plus pagination metadata including `total`, `currentPage`, `limit`, and `pages`. Use the replies endpoint to get nested replies for specific comments. Full gateway path is `/quran-reflect/v1/posts/{id}/comments`; this is not a `/content/api/v4` endpoint. This Quran Reflect endpoint is compatible with the `client_credentials` grant and requires `x-auth-token` and `x-client-id` with the `comment.read` scope. User-bound tokens may still influence comment visibility.
name required in description schema
id
true
path
Unique numeric Quran Reflect lesson or reflection post ID.
type
number
name required in description schema
limit
false
query
Number of comments to return per page for the lesson or reflection post.
minimum maximum default type
1
20
20
number
name required in description schema
page
false
query
Page number of comments for the lesson or reflection post.
minimum default type
1
1
number
200 404
description content
Comments for the Quran Reflect lesson or reflection retrieved with pagination metadata
application/json
schema example
type properties required title
object
total currentPage limit pages comments
type example
number
10
type example
number
1
type example
number
10
type example
number
1
type items
array
type properties required title
object
id postId authorId parentId isPrivate body createdAt updatedAt toxicityScore repliesCount likesCount reported removed hidden languageId languageName moderationStatus author mentions tags
type
number
type
number
type
string
type
number
type default
boolean
false
type
string
format type
date-time
string
format type
date-time
string
type
number
type default
number
0
type default
number
0
type default
boolean
false
type default
boolean
false
type default
boolean
false
type
number
type
string
type
number
type properties required title
object
postsCount avatarUrls id username verified firstName lastName memberType
type
number
type properties
object
small medium large
required type
true
string
required type
true
string
required type
true
string
type
string
type
string
type default
boolean
false
type
string
type
string
type
number
avatarUrls
id
CommentAuthor
type items
array
type properties required title
object
postsCount avatarUrls id username verified firstName lastName memberType locations followersCount displayName
type
number
type properties
object
small medium large
required type
true
string
required type
true
string
required type
true
string
type
string
type
string
type default
boolean
false
type
string
type
string
type
number
type
object
type
number
type
string
avatarUrls
id
locations
followersCount
UserWithMentionLocations
type items
array
type properties required title
object
language id name commentsCount
type
string
type
number
type
string
type
number
id
CommentTag
id
postId
authorId
parentId
isPrivate
body
createdAt
updatedAt
Comment
total
currentPage
limit
pages
comments
PostCommentsResponse
total currentPage limit pages comments
1
1
20
1
id postId authorId parentId isPrivate body createdAt updatedAt
501
101
user-456
0
false
Comment text
2026-04-01T13:00:00.000Z
2026-04-01T13:00:00.000Z
description
Quran Reflect lesson or reflection not found
Quran Reflect Lessons and Reflections
url description
Pre-production Server
url description
Production Server
x-auth-token x-client-id
get
/quran-reflect/v1/posts/{id}/comments
x-auth-token x-client-id
type description name in
apiKey
The access token required for accessing the endpoints.
x-auth-token
header
type description name in
apiKey
Your client Id
x-client-id
header
title description version
Content APIs
Quran.Foundation Content APIs offer programmatic access to the Quran's core content like chapters, verses, recitations, translations, and more, distinct from user-specific data like notes and bookmarks provided by [User-related APIs](/docs/category/user-related-apis). :::important Integrity of Translations Please **disable any automatic browser-translation features** (e.g. Google-Translate-in-Chrome) when displaying text returned by the *Translations* endpoints. Re-translating an already vetted Quranic translation can introduce serious semantic errors. ::: ## How to get access We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to [get an access token](/docs/tutorials/oidc/getting-started-with-oauth2#obtaining-oauth-20-client-credentials) to make requests to our APIs. Since the APIs are not user-related, you will need to use the `client_credentials` grant type and [`content` scope](/docs/user_related_apis_versioned/scopes#content) when sending a request to [The OAuth 2.0 Token Endpoint](/docs/oauth2_apis_versioned/oauth-2-token-exchange) to get the access token. ```mermaid sequenceDiagram participant App as Your App participant Auth as Quran.Foundation<br/>Authorization Server participant API as Quran.Foundation<br/>Resources Server App->>Auth: Request Token with Client Credentials Auth-->>App: Token Response (access_token) App->>API: Use token to call API API-->>App: Requested resource Note over App,Auth: Access token expires (1 hour) App->>Auth: Re-issue access_token using client_credentials Auth-->>App: New access_token ``` After getting a valid access token, each request to get resources will have to include 2 headers mentioned below: `x-auth-token` and `x-client-id`. This spec also includes a small subset of Quran Reflect post-read endpoints that are compatible with the `client_credentials` grant. These operations still require `x-auth-token` and `x-client-id`, but they do not use the `content` scope. Use `post.read` for `/quran-reflect/v1/posts/feed`, `/quran-reflect/v1/posts/{id}`, and `/quran-reflect/v1/posts/user-posts/{id}`. Use `comment.read` for `/quran-reflect/v1/posts/{id}/comments` and `/quran-reflect/v1/posts/{id}/all-comments`. These are Quran Reflect gateway endpoints, not `/content/api/v4/...` endpoints.
v4
name description url header method auth
Get Comments for a Quran Reflect Lesson or Reflection
content type
Retrieve paginated top-level comments for a Quran Reflect lesson or reflection post. The response returns comment objects plus pagination metadata including `total`, `currentPage`, `limit`, and `pages`. Use the replies endpoint to get nested replies for specific comments. Full gateway path is `/quran-reflect/v1/posts/{id}/comments`; this is not a `/content/api/v4` endpoint. This Quran Reflect endpoint is compatible with the `client_credentials` grant and requires `x-auth-token` and `x-client-id` with the `comment.read` scope. User-bound tokens may still influence comment visibility.
text/plain
path host query variable
quran-reflect
v1
posts
:id
comments
{{baseUrl}}
disabled description key value
false
content type
Number of comments to return per page for the lesson or reflection post.
text/plain
limit
disabled description key value
false
content type
Page number of comments for the lesson or reflection post.
text/plain
page
disabled description type value key
false
content type
Unique numeric Quran Reflect lesson or reflection post ID.
text/plain
any
id
key value
Accept
application/json
GET
type apikey
apikey
type value key
any
x-auth-token
key
type value key
any
<API Key>
value
type value key
any
header
in
sidebar_class_name get api-method
info_path docs/content_apis_versioned/content-apis
custom_edit_url
displayed_sidebar APIsSidebar

import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem";

Get Comments for a Quran Reflect Lesson or Reflection

Retrieve paginated top-level comments for a Quran Reflect lesson or reflection post. The response returns comment objects plus pagination metadata including total, currentPage, limit, and pages. Use the replies endpoint to get nested replies for specific comments. Full gateway path is /quran-reflect/v1/posts/{id}/comments; this is not a /content/api/v4 endpoint. This Quran Reflect endpoint is compatible with the client_credentials grant and requires x-auth-token and x-client-id with the comment.read scope. User-bound tokens may still influence comment visibility.

Path Parameters
    Query Parameters

      Comments for the Quran Reflect lesson or reflection retrieved with pagination metadata

      Schema
        comments object[] required
      • Array [
      • author object
        avatarUrls object required
        mentions object[]
      • Array [
      • avatarUrls object required
      • ]
      • tags object[]
      • Array [
      • ]
      • ]

      Quran Reflect lesson or reflection not found