TagMangoTagMango Docs
Feed

Get Feed Posts

GET
/api/v1/external/feeds/posts

Get all the posts for a creator or subscriber.

  • If accessed on behalf of a subscriber, posts will be filtered based on active subscription for the mangoes in the post.
  • If accessed on behalf of a creator, posts will be filtered based on the creator.
  • If accessed without any parameters, all the posts will be returned for the creator.
AuthorizationBearer <token>

In: header

Query Parameters

limit?number

Number of items per page of the results

Range1 <= value
page?number

Page number of the results

Range1 <= value
user?string

Unique identifier of the user, if accessed on behalf of a subscriber, courses will be filtered based on active subscription for the mangoes in posts

mangoes?string

Comma seperated list of mangoes for filtering feed posts

contentTypes?string

Comma seperated content types of feed post

Available values: video, image, pdf, xls, doc, text, carousal
sortBy?string

Sort by posts

Available values: recent, oldest, most-viewed

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/feeds/posts" \  -H "x-whitelabel-host: string"
[
  {
    "total": 10,
    "data": [
      {
        "_id": "64fbc8d765c6e5b324d12345",
        "title": "Introduction to Mango",
        "caption": "Learn the basics of Mango in this video.",
        "contentType": "video",
        "contentUrl": "https://example.com/video.mp4",
        "isPinned": true,
        "mangoArr": [
          {
            "_id": "66a1390268a76f2f5c9f39a3",
            "title": "Introduction to Coding"
          }
        ],
        "likeCount": 10,
        "commentCount": 10,
        "replyCount": 10,
        "views": 10,
        "liked": true,
        "poll": {
          "createdAt": "2024-11-04T13:05:43.799Z",
          "updatedAt": "2024-11-04T13:05:43.799Z",
          "_id": "64fbc8d765c6e5b324d12345",
          "post": "64fbc8d765c6e5b324d67890",
          "question": "What is your favorite programming language?",
          "description": "Choose your preferred programming language from the options below.",
          "pollOptions": [
            {
              "_id": "64fbc8d765c6e5b324d12345",
              "optionType": "text",
              "optionContent": "Option 1 description",
              "optionThumbnail": "https://example.com/thumbnail.jpg",
              "optionNumber": 1,
              "optionId": "opt_123456"
            }
          ],
          "pollStartAt": "2024-01-25T12:00:00Z",
          "pollEndAt": "2024-01-30T12:00:00Z",
          "mangoArr": [
            "64fbc8d765c6e5b324d45678",
            "64fbc8d765c6e5b324d56789"
          ],
          "voteCounts": {
            "opt_123456": 15,
            "opt_789012": 23
          },
          "totalVotes": 38,
          "creator": {
            "_id": "6659ca9e5f2acb7abfdcd8fd",
            "name": "John Doe",
            "host": "yourhost.tagmango.com",
            "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
            "profilePicUrlUncompressed": "https://linktouncompressedpic.com/pic.jpg",
            "res100x100": "https://linkto100x100pic.com/pic.jpg",
            "res45x45": "https://linkto45x45pic.com/pic.jpg",
            "res100x100_quality_20_blr": "https://linkto100x100quality20blurpic.com/pic.jpg",
            "res45x45_quality_20_blr": "https://linkto45x45quality20blurpic.com/pic.jpg"
          }
        },
        "creator": {
          "_id": "6659ca9e5f2acb7abfdcd8fd",
          "name": "John Doe",
          "host": "yourhost.tagmango.com",
          "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
          "profilePicUrlUncompressed": "https://linktouncompressedpic.com/pic.jpg",
          "res100x100": "https://linkto100x100pic.com/pic.jpg",
          "res45x45": "https://linkto45x45pic.com/pic.jpg",
          "res100x100_quality_20_blr": "https://linkto100x100quality20blurpic.com/pic.jpg",
          "res45x45_quality_20_blr": "https://linkto45x45quality20blurpic.com/pic.jpg"
        },
        "postRef": {
          "title": "Introduction to Mango",
          "caption": "Learn the basics of Mango in this video.",
          "contentType": "video",
          "contentUrl": "https://example.com/video.mp4",
          "creator": {
            "_id": "6659ca9e5f2acb7abfdcd8fd",
            "name": "John Doe",
            "host": "yourhost.tagmango.com",
            "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
            "profilePicUrlUncompressed": "https://linktouncompressedpic.com/pic.jpg",
            "res100x100": "https://linkto100x100pic.com/pic.jpg",
            "res45x45": "https://linkto45x45pic.com/pic.jpg",
            "res100x100_quality_20_blr": "https://linkto100x100quality20blurpic.com/pic.jpg",
            "res45x45_quality_20_blr": "https://linkto45x45quality20blurpic.com/pic.jpg"
          },
          "likeCount": 10,
          "commentCount": 10,
          "replyCount": 10
        },
        "tags": [
          {
            "tagName": "JavaScript",
            "creator": "64fbc8d765c6e5b324d67890"
          }
        ]
      }
    ]
  }
]
{
  "code": 400,
  "type": "Bad request",
  "statusMessage": "BAD_REQUEST",
  "message": "Invalid request",
  "success": false
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "success": false
}